Custom reset password template after forgot password request
I believe the Theme My Login plugin does this. You may want to dig into the source and figure out how they do it.
I believe the Theme My Login plugin does this. You may want to dig into the source and figure out how they do it.
That’s because the main query is being discarded and replaced with your custom query. You’ve not told your custom query to look for that tag, so why would it? You might also notice your pagination is broken for the same reason, you’ve not told the new query which page you’re on, so why would it … Read more
Front page template logic is horrendous legacy mess. While back I wrote a very thorough front page cheatsheet, I still can’t completely remember how it works. You are right to notice that theme in your case doesn’t behave in same way as other themes typically do. If you run down specific template being used (plugin … Read more
The page template’s filename is stored as a post meta with key ‘_wp_page_template’, so basically you can use get_post_meta($post_id, ‘_wp_page_template’, true); to get the template filename for the page with ID $post_id. You can also do the reverse (i.e. getting id from page template filename) using Custom Field Parameters in WP_Query or other wordpress functions. … Read more
WordPress has a built-in template hierarchy that determines what template file will be loaded for a given type of post or page. If you have a look at the visual overview of the hierarchy, you’ll find that custom posts have their own specific entries. For example, if your custom post type is named book, then … Read more
What you want to do is impossible without a page.php type of template. There is no template hierarchy that support what you want to achieve. It works exactly the same with categories. taxonomy-categorycourses.php will not display a list of categorycourses, so would category-categorycourses.php if categorycourses was a normal category. If you click on categorycourses, you … Read more
You have totally missed the naming convention when coming to the taxonomy archive pages, and most probably the same goes for your archive pages for your custom post types Here is how your taxonomy archive pages should look like taxonomy-{taxonomy}-{term}.php – If the taxonomy were sometax, and taxonomy’s term were someterm WordPress would look for … Read more
wp_nav_menu has the argument fallback_cb, which is the function called if a menu doesn’t exist. This is set to wp_page_menu by default, which is why you see a list of pages if the menu doesn’t exist. If you explicitly set that to false, then nothing will be output if the menu doesn’t exist. EDIT- Given … Read more
User Rarst has a very famous answer where he lays out the load process. Looking at this graph whenever wp-blog-header.php gets loaded it calls function wp() which sets up many of WordPress globals like $post and $wp_query. ( Secondary Reference by User Gmazzap ) That’s the technical side of things but it looks like the … Read more
WooCommerce uses the template_include filter/hook to load main templates like archive-product.php and single-product.php. And here’s the class which handles main templates. And there’s a filter in that class which you can use to capture the default file (name) which WooCommerce loads based on the current request/page — e.g. single-product.php for single product pages. You can’t, … Read more