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

Pagenavi Plugin and Custom Post Type – Multipage results

you are quering the same posts over and over, and that is way you are getting the same posts, to fix it just add ‘paged’ => get_query_var(‘paged’) to your query arguments, so change: <?php $portfolioloop = new WP_Query( array( ‘post_type’ => ‘portfolio’, ‘posts_per_page’ => 12 ) ); ?> into: <?php $portfolioloop = new WP_Query( array( … 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)