Hot answers tagged

3

You can always make use of the page_template filter to tell WordPress to use a specific page template for all child pages of a certain parent. It is as easy as creating a special page template, lets call it page-wpse-person.php. Now it is as easy as including that template whenever a child page of people is being viewed. For the sake of example, lets say ...


2

The easiest way would be to create a custom post type 'person', in which you include the custom fields. The WordPress template hierarchy would then ensure that the single-person.php template is used for those posts.


2

These are almost certainly custom post types. In the definition of the custom post type, it is possible to define a menu_icon which can be a file or an icon from the iconfont. It is this menu_icon that is showing up in your admin menu. I also notice "Programs Categories" in your menu, this looks like a custom options page - which will have also been ...


2

I would not recommend using subpages for sections for the following reasons: The section subpages can be deleted, set to draft and many other misuses by mistake. It is difficult to control the user input on them. There is no easy way to deal with booleans or options, such as "show/hide this" or "use design 2 for this section". When retrieving the page ...


1

To expand your conditional to check for display of one of your terms, you can do this: if ( is_page() ) { the_title(); } elseif ( is_tag() ) { single_tag_title(); } elseif ( is_tax( 'mtags' ); ) { single_term_title('More Tags: '); } However, if you use your theme's custom taxonomy template for this taxonomy, taxonomy-mtags.php, then you can ...


1

You need the WP_Query documentation. WP_Query is very powerful, and you can do a lot with it :) In your case, I don't think exclude is a valid parameter. What you're probably looking for is this: $query->set( 'post__not_in', array( 34 ) ); Here's the Post & Page Parameters section of the documentation, which covers this and the other parameters ...


1

Duplicates don't just come from Pages and Posts, WordPress also defines Images and Files from the Media Library as "Posts". This means if you have a file / image in the Media Library with the same name as a page, it will assign the next duplicate a -2 ( from the wp_unique_post_slug() function ) so there's no URL conflicts. TL;DR - Duplicate? Search for ...


1

Since 3.7 there is a filter to change the width of the wrapping div directly. This will fix the extra 10px, and won't let the caption extend past the width of the image (unlike width: auto !important). function wp456_img_caption_width( $width, $atts, $content){ //by default 10 is added if image caption return $width - 10; } add_filter( '...



Only top voted, non community-wiki answers of a minimum length are eligible