amarettosour
Forum Replies Created
-
Forum: Plugins
In reply to: [Kirki Customizer Framework] Filtering google fontsBrilliant, I’ll give it a go once it’s out. Thanks.
Forum: Plugins
In reply to: [Kirki Customizer Framework] Filtering google fontsApologies it has taken me so long to reply. I just tried the latest develop version and the issue is still the same.
Forum: Plugins
In reply to: [Simple Share Buttons Adder] Feature Request on Position of Twitter TextI second this request!
Forum: Plugins
In reply to: [The Events Calendar] End time is wrong on all eventsThanks, I’ll wait for the patch the developer mentioned should be coming today.
Forum: Plugins
In reply to: [The Events Calendar] End time is wrong on all eventsOn second look it’s the entire end date that’s wrong and it’s setting the end date to the exact time and date of my machine now (minus an hour) as I’ve noticed the time kept going up from when I looked and it said: Wednesday 10th July 11:38
Forum: Fixing WordPress
In reply to: Pagination: current page OF total pagesBrilliant, thank you.
For reference if anyone is trying to do the same thing, my final code is:
function paginate() { global $wp_query, $wp_rewrite; $wp_query->query_vars['paged'] > 1 ? $current = $wp_query->query_vars['paged'] : $current = 1; $pagination = array( 'base' => @add_query_arg('page','%#%'), 'format' => '', 'total' => $wp_query->max_num_pages, 'current' => $current, 'show_all' => false, 'end_size' => 0, 'mid_size' => 0, 'type' => 'list' ); if ( $wp_rewrite->using_permalinks() ) $pagination['base'] = user_trailingslashit( trailingslashit( remove_query_arg( 's', get_pagenum_link( 1 ) ) ) . 'page/%#%/', 'paged' ); if ( !empty($wp_query->query_vars['s']) ) $pagination['add_args'] = array( 's' => get_query_var( 's' ) ); $prev = get_previous_posts_link('<'); $next = get_next_posts_link('>'); $links = paginate_links($pagination_args); $links = "<span class='pagexofy'>$prev $current of $wp_query->max_num_pages</span> $next" . $links; echo $links; }
I understand how the function works but I’m confused about how it works in the loop (probably because I can’t get it to work!)
I’m using the function (with the column divs changed to mine and counter changed to 4) and this is my loop which I am assuming is wrong. Sorry, it takes me time to get my head around PHP!
<?php if (have_posts()) : ?> <?php while (have_posts()) : the_post();?> <?php dr_Get_Post_Images(); ?> <div id="post" <?php post_class(); ?>> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <?php endwhile; ?> <?php endif; ?> </div>