How to assign a single-menu-template to a menu-items in a taxony/ cat/ subcat/ subcat-item
How to assign a single-menu-template to a menu-items in a taxony/ cat/ subcat/ subcat-item
How to assign a single-menu-template to a menu-items in a taxony/ cat/ subcat/ subcat-item
There could be edge cases where the index template could be used. For example, a plugin or a future WordPress version could introduce a new template hierarchy “type” that is not covered by any other template. WordPress would use the index template as a fallback in this case. Of note, the WordPress Theme Handbook mentions … Read more
Does anyone have any suggestions on how to disable certain template parts in a child theme using theme.json in WordPress with Gutenberg? Using only theme.json this is not possible, and runs counter to the vision for full site editing. In the future it’s possible that not only the parent theme templates might be visible, but … Read more
Make sure that you have the correct slug for the taxonomy or tag.
I used the following function to retrieve the URLs of each page. function template_debug($filename = null) { $url = home_url($_SERVER[‘REQUEST_URI’]); debug(“Called from: $filename using URL $url \n”); } Then I inspected the front page which triggered the 404 template along with the front-page template. The Network Monitor tab showed the error, which was an incorrect … Read more
index.php and archive.php might be the same but don’t have to be the same. index.php will display your blog post archive and in the absence of archive.php (or other more specific archive files) it will display your date, author, etc. archives as well. But it doesn’t have to. You can, if you want, display your … Read more
If you don’t want to deal with the coding part that much, you can always take a look on WCK plugin, that allows you to create custom taxonomies, and allow your users to see the information displayed as you want.
WordPress does not support by default custom_fields archive like for taxonomies (yeah, taxonomies can have categories) but we can create a destination page with page template (linked from the listed custom_field) and added a searching on the custom_field, like this (from the listing page): <?php if (get_post_meta($post->ID,’_my_meta’,TRUE)) : $key_meta = get_post_meta($post->ID,’_my_meta’,TRUE); endif; ?> <a href=”https://wordpress.stackexchange.com/questions/92473/<?php … Read more
Different template fallback when changing permalinks
thats how wordpress template works front-page.php is the very first file that wordpress check for the homepage and to be use as a template, if it doesn’t exists it checks another file in specific order like page-slug.php, page-id.php, page.php until it reaches index.php the blog/posts page would first check if home.php exist and if not … Read more