Ashley Michèlle
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Pagination not working on custom template.Aha! You are a genius! Thanks so much for this! You saved me countless hours, and headaches. E-cookie?
Just one (okay, two) things before you go –
I am using this below to generate the pagination:
<?php global $wp_query; $big = 999999999; // need an unlikely integer echo paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'total' => $wp_query->max_num_pages ) );?>
Will this (and your fix) also work on all of my custom Page templates?
And, can the Next Previous links be changed to images?Thanks so much!
Forum: Fixing WordPress
In reply to: Pagination not working on custom template.Well, you can see everything I have up in the loop there in the pastebin link, but this is my main query:
<?php if (is_home()) { query_posts("cat=-94"."&posts_per_page=9");}?> <?php $c = 1; //init counter $bpr = 3; //boxes per row if(have_posts()) : while(have_posts()) : the_post();?>
Forum: Fixing WordPress
In reply to: Custom Slider-Style PaginationAlso, this is the theme function I am calling:
global $wp_query; $total_pages = $wp_query->max_num_pages; if ($total_pages > 1){ $current_page = max(1, get_query_var('paged')); echo '<div class="page_nav">'; echo paginate_links(array( 'base' => get_pagenum_link(1) . '%_%', 'format' => '/page/%#%', 'current' => $current_page, 'total' => $total_pages, 'prev_text' => 'Prev', 'next_text' => 'Next' )); echo '</div>'; }
Forum: Fixing WordPress
In reply to: Custom Slider-Style PaginationBlacklizt – Thank you!
I have run into some errors with the pagination, unfortunately…
I can not quite figure where to insert the
<?php echo paginate_links( $args ) ?>
line into my main index code:<?php get_header(); ?> </div><div id="gridContainer"> <?php $slug = 'information'; $category = get_category_by_slug($slug); query_posts($query_string . '&cat=-' . $category->cat_ID); ?> <?php $c = 1; //init counter $bpr = 3; //boxes per row if(have_posts()) : while(have_posts()) : the_post(); ?> <div class="gridpost" id="post-<?php the_ID(); ?>"> <a href="<?php the_permalink(); ?>"><div class="postImage" id="fade"> <div class="postData"><div id="gridTitle"><?php the_title(); ?></div></div><?php the_post_thumbnail('grid-post-image'); ?></a> </div> <?php if($c%3 == 0){ $c = 'last'; }else{ $c = ''; } $c++; ?> </div> <?php if($c == $bpr) : ?> <div class="clr"></div> <?php $c = 0; endif; ?> <?php $c++; endwhile; endif; ?> <div class="clr"></div> </div> <?php get_footer(); ?>
It is not showing up at all, regardless of where I place it. I can only assume it’s user error on my part, so any help would be immensely appreciated!
Forum: Themes and Templates
In reply to: Help with creating a 3-column image gridI have accomplished what I set out to do! A live example can now be seen here: https://ohmybonbon.com
Forum: Hacks
In reply to: Possibe jQuery plugin?Programming knowledge is not currently the issue; I’m just clueless as how to go about this. Ha…
An outline of how to accomplish the aforementioned would be splendid!
Thanks in advance to anyone that can help!Forum: Hacks
In reply to: Possibe jQuery plugin?2. A bit like this transition for the on-click action, only horizontal.