How to get a list of pages (not posts) with specific tags?

get_pages() is a valid function, but it doesn’t have any parameters for getting pages with specific taxonomy terms assigned. WP_Query will get posts of any type (such as Pages) and can query by taxonomy terms. If you don’t want to look through your plugin’s code to find out what it calls the Page Tag taxonomy, … Read more

Dashboard show only published pages instead of all pages

Try this solution. Works for me. add_action( ‘admin_menu’, ‘customize_pages_admin_menu_callback’ ); function customize_pages_admin_menu_callback() { global $submenu; foreach ( $submenu[‘edit.php?post_type=page’] as $key => $value ) { if ( in_array( ‘edit.php?post_type=page’, $value ) ) { $submenu[‘edit.php?post_type=page’][ $key ][2] = ‘edit.php?post_status=publish&post_type=page’; } } } further, you can also hide All using CSS if needed. <style> .post-type-page .subsubsub .all{ display:none} … Read more

display new WordPress page content

First of all, you need to select the new template as your page’s template while creating a new page. To do this, choose the new template under “Page Attributes” setting just like below screenshot: Now, you should make sure you are outputting the content in your page. Create a simple loop, and use the_content() within: … Read more

Add tags to long page that is broken up into subpages?

You have to add tag support to your Pages. function page_tags() { register_taxonomy_for_object_type(‘post_tags’,’pages’); // adds tag support add_meta_box(‘tagsdiv-page_tag’,’tags’,’post_tags_meta_box’,’page’,’side’,’low’); // adds the meta box itself } add_action(‘admin_init’,’page_tags’); You still won’t see tags anywhere. You can move the meta box around using the ‘side’ and ‘low’ parameters. See the link below. Now look in TwentyEleven’s content-single.php and … Read more