Loading files for theme and child theme (Require)

There seems to be so many options which one should i go for..it’s really confusing? I have used get_template_directory(). What i want is to use a function that works best with child theme and that should work alone if no child theme is used..pls help get_theme_file_uri() get_parent_theme_file_uri() get_theme_file_path() get_parent_theme_file_path() get_template_directory() TEMPLATEPATH 1 Answer 1 get_theme_file_uri(), … Read more

Changing order title and featured image in blog post (Astra theme)

The HTML of a post type, I want to swap the position of the title and the thumbnail. I noticed that the title and thumbnail are inside a <header> tag. So I went looking which template file has this markup, applied to the post type ‘post’ So instead of this <header class=”entry-header ast-no-meta”> <div class=”post-thumb-img-content … Read more

Uncaught Error: Call to undefined function get_user_by() after moving function from theme to plugin

I have a code I always used in my themes or child-themes. I’m doing right now a project with plugin-only as a solution, so I tried to copy paste some stuff from child-theme to plugin file, but I get error 500: Fatal error: Uncaught Error: Call to undefined function get_user_by() in (…) The same code … Read more

Make “sidebar template” the default template for new pages

On Twenty Eleven or on its child themes the default template for new pages is a template with no sidebar. I don’t know why this is like this; it seems to me that the designers of WordPress are still not thinking about CMS functionality in some places. For example the most obvious place to put … Read more

How to remove thumbnail sizes for specific post type on a child theme?

The theme I’m using includes a slideshow that generates an additional 4 image sizes for every image that is uploaded. I don’t need to have all those images being generated for every image. Is there a way to remove the slideshow thumbnail sizes for a custom post type in my child theme? Thanks 2 Answers … Read more