Pagination don’t list all entries on Index.php

Thank you both. Meanwhile I got it to work perfect. The way was done with pre_get_posts. My solution now is the function: function numberposts_for_index( $query ) { if( $query->is_main_query() && ! is_admin() && $query->is_home() ) { $query->set( ‘posts_per_page’, ‘4’ ); $query->set(‘post_status’,’future,publish’); }} add_action( ‘pre_get_posts’, ‘numberposts_for_index’ );“` and my code in the index.php now: “`<?php if(have_posts()) … Read more

what code to add to search.php

If I understand correctly, you want to show more results on your search results page? this is defined by the posts per page setting in the admin panel, but can be modified in the search.php template by adding this before the loop: <?php $myquery = “&posts_per_page=50”; // set to number of results you want per … Read more

Search URL redirect problem

You must be using an image button for your submit. It sends the x and y coordinates of where the button was clicked as well as any other get parameters. I would recommend using a standard submit button and then use CSS to replace it with an image. Alternatively if you don’t know CSS a … Read more

Custom post type pagination like “previous current/all next”

I’ve solved it For previous/next use Ambrosite Next/Previous Post Link Plus To get current/all use following code inside the loop $query = new WP_Query( array( ‘post_type’ => ‘works’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => ‘-1’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘work_category’, ‘field’ => ‘slug’, ‘terms’ => ‘design’ ) ), ‘order’ => ‘ASC’ ) ); $all … Read more

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