How can I create an entirely new, separate display of posts?

Here’s what I ended up with: Everything within my child-theme file example-single.php for displaying individual posts within a template file example.php a new template as a destination for new routes. new routes and a filter on ‘pre_get_posts’ All of the following can simply go in functions.php in the child theme: function example_routes() { // add … Read more

How to use a conditional statement in a post loop but not count towards the “posts_per_page” if false

The simplest solution would be to query all posts using a -1 in place of the 12 in your ‘posts_per_page’ argument of your query. Then use a counter that ticks up if all of the above conditions equal true. $args = array( ‘post_type’ => $post_slug, ‘posts_per_page’ => -1, ‘paged’ => 1, ‘post_status’ => ‘publish’, ); … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)