How can I alter a post?
How can I alter a post?
How can I alter a post?
How should i name the .php file to show custom posts under a taxonomy’s term?
You can use the Body Class Filter for this to adjust the classes being added to the body tag. add_filter(‘body_class’,’review_pages_classes’); function review_pages_classes($classes) { $classes[] = ‘blog’; return $classes; } Which classes you need to add or remove is probably a matter of trial and error, or looking at the stylesheets in more detail.
Something like this would work: <!–Child Page Thumbnails Start–> <?php $subs = new WP_Query( array( ‘post_parent’ => $post->ID, ‘post_type’ => ‘page’, ‘meta_key’ => ‘_thumbnail_id’ ) ); if( $subs->have_posts() ) : while( $subs->have_posts() ) : $subs->the_post(); echo ‘<a href=”‘.get_permalink().'” title=”‘.get_the_title().'”>’.get_the_post_thumbnail().'</a>’.'<br/><h2><a href=”‘.get_permalink().'”>’.get_the_title().'</a></h2>’; the_content(); endwhile; endif; wp_reset_postdata(); ?> <!–Child Page Thumbnails End–>
Your initial idea is correct, WordPress shouldn’t look for index.php if it finds category.php for a category archive. However, that may change if you don’t have file permission and ownership set properly, or if FileSystem cache is messing with file_exists() check. Follow these steps: Make sure your child theme files are readable by the web … Read more
From a usability point of view, have you considered using some sort of sub-menu (maybe a widget in a sidebar), since navigating that many nested menus might be a bit difficult. Anyways – back to your question. yes you should use a macro. Here’s an example I’ve used before to generate a 3 level deep … Read more
If you have access to the server you can create the file there (inside the theme folder) and edit it from the theme editor.
Looks like there’s a conflict with your post type key and page slug. Try changing your page’s slug to something different and see if it changes anything.
I just found out what I was doing wrong. Apparently you have to place archive pages in the root folder of your theme. I placed them in a subfolder called templates. This works for page templates with a template name, but not for taxonomy.php, archive.php, single.php etc.
Validating Error with submit button