margins in between pagination links [closed]
Sure, try this in the custom.css file: .wp-pagenavi a { margin-right: 5px; }
Sure, try this in the custom.css file: .wp-pagenavi a { margin-right: 5px; }
A siple search on google got me to these websites: http://codex.wordpress.org/Function_Reference/paginate_links https://codex.wordpress.org/Pagination These are WordPress Tutorials for setting pagination. You can also install a plugin, I recommend WP PageNavi. http://wordpress.org/plugins/wp-pagenavi/
Your query displays the first 9 posts regardless of page because you don’t set the page number in your query arguments. $paged = ( get_query_var(‘paged’) ) ? get_query_var(‘paged’) : 1; $args = array( ‘post_type’ => ‘issues’, ‘posts_per_page’ => ‘9’, ‘order’ => ‘ASC’, ‘paged’ => $paged );
Your construction of your custom loop is a bit of a mess unfortuantely. I’m not going to go through this now, but I’ll add links for you to go and read through :-). You should go and have a look on how to properly construct a custom query with WP_Query. You should also have a … Read more
Okay I got it.. Apparently there’s going to be some be issues if you name your page name the same as your custom post type. In this case my page was named ‘articles’ while my custom post type is also named ‘articles’ so that why I it didn’t work. I made a new page tested … Read more
That’s because you have to change your query also have add ‘paged’ => get_query_var( ‘paged’ ) So your new query should look like $args=array( ‘post_type’ => ‘post’, ‘paged’ => get_query_var( ‘paged’ ),// add this line ‘post_status’ => ‘publish’, ‘posts_per_page’ => 20 ); For for information have a look at the WP_QUERY Class
IF you a using a query post make sure to add if ( get_query_var(‘paged’) ) { $paged = get_query_var(‘paged’); } elseif ( get_query_var(‘page’) ) { $paged = get_query_var(‘page’); } else { $paged = 1; } query_posts( ‘post_type=yourposttype&paged=’.$paged); above script will correct the dead links on wordpress pagination.
<?php query_posts(‘offset=1′); ?> This is your problem. The pagination functions work off of the main query, but you replace the main query at the start of every page, and the only thing you’ve told it is that the offset is 1, how is it supposed to know you wanted page 2?! So instead, I’m going … Read more
This is the pagination function I use. I’m not sure if the github link is the original credit, but its one i found. Add the following to your functions.php file: /** * Creates Custom Pagination * @link https://gist.github.com/rgfx/755cfb71fd1732e4e7b7bdcbd4b6e4e3 * @param string $numpages Show pagination in WP_Query * @param string $pagerange Show pagination in WP_Query * … Read more
Your only real reason to try and use paginate_links() seems to be your custom ‘before_page_number’ argument. Ditch your code and use the_posts_pagination(); instead, pass it only the ‘before_page_number’ argument in an array.