Later blog post pages give 404 error

First, try rebuilding your permalinks. Go to Settings >> Permalinks and click Save, which will rebuild them. If that doesn’t work, go into your Settings >> Reading >> Blog pages show at most setting and try increasing or decreasing that and see how that changes things. Some themes have a setting that lets you adjust … Read more

Is it possible to restrict access to specific pages in the admin area based on the page slug?

So following from the comment discussion, a sufficient answer on another StackEx question goes like this: add_filter( ‘parse_query’, ‘exclude_pages_from_admin’ ); function exclude_pages_from_admin($query) { global $pagenow,$post_type; if (is_admin() && $pagenow==’edit.php’ && $post_type ==’page’) { $query->query_vars[‘post__not_in’] = array(’21’,’22’,’23’); } } The only part that’s terribly important to us is the array of post IDS. The problem is … Read more

How do I edit text displayed on my browser tab?

You can either use this code in your function.php remove_all_filters( ‘wp_title’ ); add_filter(‘wp_title’, ‘filter_pagetitle’, 99,1); function filter_pagetitle($title) { $title = get_bloginfo(‘name’); return $title; } Or install plugin like Yoast SEO. EDIT : Screenshot UPDATE : Change header.php in your theme folder if above solution doesn’t work for you. <title><?php get_bloginfo(‘name’); ?></title>

multiple post into single page

As far I understood you need to show those pages content through that query. So you can modify your code like below- <?php get_header(); ?> <div id=”primary” class=”site-content”> <div id=”content” role=”main”> <?php $args = array( ‘post_type’ => ‘page’, ‘post__in’ => array( 2770, 10, 266, 1558 ) //list of page_ids ); $page_query = new WP_Query( $args … Read more

How To Render Shortcode In AJAX Response?

In general, sshortcodes are not a programming construct, they are content macros. As content macros, their viability in being used outside of their content context is limited. Simplistic shortcodes, like the gallery/audio/video (and I am not sure even about them) might “render” without context, but advanced ones will need a properly set loop, and calls … Read more

How to exclude authors from get_pages()

https://codex.wordpress.org/Function_Reference/get_pages this function does not take exclude author args. If you want to exclude a specific author and want to display all pages. Then you can do this easily by WP_Query.

Need to create a custom page on a website

First, if you want to build a custom page, the best place to look is the themes folder. If your working on a custom made theme, you can add templates to the theme folder, and use them in your site. Otherwise, it’s better to create a child theme for your customization (Childthemes). Within that new … Read more