Pagination (page/2/) displaying 404 on archive pages

Found the answer!!! Put this in functions.php (or a required file). Of course, change it to suit your needs. I needed something that only worked for product category archives. function modify_product_cat_query( $query ) { if (!is_admin() && $query->is_tax(“product_cat”)){ $query->set(‘posts_per_page’, 2); } } add_action( ‘pre_get_posts’, ‘modify_product_cat_query’ ); I also took out the posts_per_page parameter from my … Read more

Pagination shows same contents all pages

Try changing $my_query to $wp_query to see if that fixes the issue. I found that when you rename the query it messes with the pagination. Also you should move the reset query after the pagination. Here’s a loop I’ve verified works with pagination: $args = array( ‘posts_per_page’ => 10, ‘post_type’ => ‘post’, ‘paged’ => get_query_var( … Read more

How can I paginate image attachments in a post?

I doubt you could paginate within a post display. It would be more effective to display all the image attachments at the page load, and have a script do the pagination. You can find a lot of them on such sites: http://www.themeflash.com/30-powerful-jquery-slideshow-sliders-plugins-and-tutorials/ You need to be able to edit your template files, specifically the header … Read more

Next & Previous (Pagination in this case) Not Appearing

<?php /* Template Name: Portfolio */ ?> <?php get_header(); ?> <div id=”full_container”> <div id=”portfolio_content”> <div id=”portfolio_wrap”> <div id=”content”> <?php $loop = new WP_Query(array(‘post_type’ => ‘portfolio’, ‘posts_per_page’ => 2)); ?> <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> <?php $custom = get_post_custom($post->ID); $screenshot_url = $custom[“screenshot_url”][0]; $website_url = $custom[“website_url”][0]; ?> <a href=”https://wordpress.stackexchange.com/questions/30616/<?php the_permalink() ?>”> <span class=”img”> <?php … Read more

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