Tag Info

New answers tagged

0

Thanks @PieterGoosen and @realloc. I came up with this solution: Added meta_key=important&meta_value=1 in wp_list_pages(). And gonna use custom field for pages important: 1. This is for list of IMPORTANT child pages. function important_list_child_pages() { global $post; if ( is_page() && $post->post_parent ) $childpages = ...


0

The function wp_list_pages() has a filter that can come in handy here: /** * Filter the array of pages to exclude from the pages list. * * @since 2.1.0 * * @param array $exclude_array An array of page IDs to exclude. */ $r['exclude'] = implode( ',', apply_filters( 'wp_list_pages_excludes', $exclude_array ) ); Personally I would rethink your ...


0

You'll have to drop all page related functions if you need this type of functionality. Pages was never meant to have taxonomies, and therefor none of the page related functions was build to offer any kind of support for taxonomies Rethink your structures and look into the use of custom post types and custom taxonomies. You can also look into using custom ...


0

I suggest a hierarchical custom post type and a conditional to create an additional loop on your single-{cpt}.php. By using hierarchical custom post type, you can create a sub-cpt , like a sub page as the stats part of it's parent post. The sub-cpt then can be used to store additional data (e.g. in post_content or custom_fields) and also the comment ...



Top 50 recent answers are included