Site pages show the page title under navigation bar

Your theme (or child theme) is likely using page.php as the default page template. This file likely contains a call to the WP function the_title() which is generating the visible page title. Multiple options to modify this. Assuming you are using a theme which will have updates available, your changes should be made using the … Read more

In category.php I need to get the next 10/previous 10 posts

if the only difference in the category archives is the images, you can work without a custom query. in this case you could use (as suggested here https://developer.wordpress.org/themes/functionality/pagination/#simple-pagination ): <div class=”nav-previous alignleft”><?php next_posts_link( ‘Older posts’ ); ?></div> <div class=”nav-next alignright”><?php previous_posts_link( ‘Newer posts’ ); ?></div> or any other suggestion from https://developer.wordpress.org/themes/functionality/pagination/ for the image, you … Read more

posts_nav_link() not working on index.php

You are missing the paged= paramter. $myquery = new wp_query(‘cat=-41&paged=’ . get_query_var( ‘page’ )); Codex Note – You should set get_query_var( ‘page’ ) if you want your query to work with pagination. Tip – If you want to eclude a category from main page you can use the pre_get_post filter. That is better way to … Read more

Get all first images of posts in same category

You can do this, and it isn’t that hard though could be a lot of work for the server. The code, a bit simplified, should look something like this: $cposts = wp_list_pluck($wp_query->posts,’ID’); // var_dump($cposts); // debug $args = array( ‘post_type’ => ‘attachment’, ‘post_mime_type’ =>’image’, ‘post_status’ => ‘inherit’, ‘order’ => ‘DESC’, ‘posts__in’ => $cposts ); // … Read more