how to get a list of all top level pages

$query_args = array( ‘post_type’ => ‘page’, ‘post_status’ => ‘publish’, ‘parent’ => 0, ); $pages = get_pages( $query_args ); Function get_pages() accepts parameter with parent. Keeping it 0 (zero) will give us first level pages. In the example $pages will contain the first level pages. Use loop for $pages and you can use it in option … Read more

page-slug.php not working but only for specific slug

I thought it might be conflicting with something I had in functions.php, however nothing else was using the name “comics” There is, here: // Arguments $args = array( ‘labels’ => $labels, ‘public’ => true, ‘menu_icon’ => ‘dashicons-book-alt’, ‘hierarchical’ => true, ‘exclude_from_search’ => false, ‘has_archive’ => true, ‘publicly_queryable’ => true, ‘rewrite’ => array( ‘slug’ => ‘comics’, … Read more

How to show ‘tags’ in ‘WordPress Pages’ [not Posts]

enter your tags instead of the specified ones or delete the extra ones: function wps_display_custom_tags ($post_meta) { // delete meta tags you do not want to display return array( ‘author’, ‘post-date’, ‘comments’, ‘sticky’, ‘tags’); } add_filter(‘twentytwenty_post_meta_location_single_top’, ‘wps_display_custom_tags’);

Change page name in admin list

You can use the_title hook to change the title of the post in the admin, something like this add_filter( ‘the_title’, ‘custom_post_title’, 10, 2 ); function custom_post_title( $title, $post_id ) { // Return early if not in the admin if ( !is_admin() ) return $title; $post_type = get_post_type( $post_id ); // You only need to change … Read more

How can I display tags as categories?

If you can setup url query parameters and when user navigates to tagfillterPage page with wp_query it should work. https://examples.com/tagfillterPage/?filltertag=tagname $querytag = $_GET[‘filltertag’]; $args = array( ‘tag’ => $querytag ); // Custom query. $query = new WP_Query( $args ); // Check that we have query results. if ( $query->have_posts() ) { // Start looping over … Read more

Can I schedule my site to launch at a set time and date?

You should create a small plugin that checks the time stamp and run on an alternate page or similar. Bigger than the time stamp, the default WordPress run should work. An Example, write my answer to this question that’s not working code. The method timestamp is your key to control the logic for loading an … Read more