Creating a Page of Posts

Try this code in your page-blog.php to display list of posts $paged = get_query_var(‘paged’) ? get_query_var(‘paged’) : 1; $args = array( ‘post_type’ => ‘post’, //Change this with your post type ‘posts_per_page’ => 10, //No. of Pages to show ‘offset’ => 0, //excluding the latest post if any ‘paged’ => $paged //For Pagination ); $loop = … Read more

Batch update menu_order attribute alphabetically

Hopefully this helps someone else Dont forget to change “your_post_parent_id_here” with the parent id of your choosing. global $wpdb; $wpdb->query( ‘SELECT @i:=-1’ ); $result = $wpdb->query( ” UPDATE wp_posts SET menu_order = ( @i:= @i+1 ) WHERE post_parent=”your_post_parent_id_here” ORDER BY post_title; ” );

How to Add a Rewrite Rule for Only One Page?

Asumption: You use Apache as your web server. If you already know the page slugs and they won’t change, just add them to your .htaccess file. It’ll be much faster and less complicated. Paste the following Redirect lines at the top of your .htaccess file. Redirect 301 /pagetitle/ /service/pagetitle/ Redirect 301 /pagetitle2/ /another-dir/pagetitle2/ # BEGIN … Read more

Categories vs. Page Site Organization

You could create a customised ‘landing page’ using a template file? Creating category-internal.php with custom layout would display content at the /category/internal/ url. Here is some more info: https://codex.wordpress.org/Category_Templates http://www.wpbeginner.com/wp-themes/how-to-create-category-templates-in-wordpress/

WordPress pages with hierarchy

If I read your question correctly you just need to set the ‘about’ page as a parent to ‘contact’ and ‘opening hours’ then the permalink will be how you want it. To do this go edit page of ‘contact’ and in the page attributes box set the parent to ‘about’ page.

Shortcode produces blank page

I agree that there is a coding error – a blank WP page is almost always caused by a fatal PHP error. You should look at the error.log file in your site’s root folder. That will tell you what/where about the error. If you edit your question to include the error messages found in error.log, … Read more

Front Page not showing on Pages

This is normal. To display your posts, index.php is being used. It is not a regular page created by you. Some call it a virtual page. If you want all posts being displayed on a page created by you, follow these steps: prepare two pages. One for front page, and second for posts ( you … Read more