Pagenavi with archive page

It always displays the first page because you tell it to: ‘paged’ => ‘1’ 🙂 That said changing main query and especially pagination inside a template is inherently unreliable. For proper customization of such you should always be adjusting main query before template is ever reached via appropriate hooks, typically pre_get_posts.

Only display posts that are in multidimensional meta_value

Solved So i ended upp with a simple SQL-query: $sql=”SELECT post_id FROM kwido_postmeta WHERE meta_value REGEXP \””‘. $area[‘area’] .'”;a:[[:digit:]]+:{[^}]*”‘. $mainpost->ID .'”\”; $results = $wpdb->get_results( $sql, ARRAY_A ); That looks after the current post_id and area with a regex, then if found get the post_id.. $post_ids = array(); foreach ( $results as $result ) { $post_ids[] … Read more

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