pagination problem
Responsive WordPress theme for musicians, bands, artists - easy to configure and various theme features.
- GK User
- Tue Oct 08, 2013 4:48 pm
Hello.
I wanted to have a pagination system instead the Older or Recent Posts links. I installed WP-PageNavi plugin but i have to modify the functions next_posts_link() and previous_posts_link() and replace them. However i can't find them in this theme.
Can you tell me where they are located?
Also, if there is this function <?php wp_link_pages( ... ); ?> in your theme i must replace this too.
Can you help me?
I wanted to have a pagination system instead the Older or Recent Posts links. I installed WP-PageNavi plugin but i have to modify the functions next_posts_link() and previous_posts_link() and replace them. However i can't find them in this theme.
Can you tell me where they are located?
Also, if there is this function <?php wp_link_pages( ... ); ?> in your theme i must replace this too.
Can you help me?
-
- Junior Boarder
- GK User
- Wed Oct 09, 2013 7:42 am
Hi,
These functions are placed in Rockwall/gavern/helpers/helpers.layout.fragments.php file (around line 300).
Check function gk_post_links and function gk_content_nav.
These functions are placed in Rockwall/gavern/helpers/helpers.layout.fragments.php file (around line 300).
Check function gk_post_links and function gk_content_nav.
-
- Moderator
- GK User
- Wed Oct 16, 2013 12:14 pm
Piotr Kunicki wrote:Hi,
These functions are placed in Rockwall/gavern/helpers/helpers.layout.fragments.php file (around line 300).
Check function gk_post_links and function gk_content_nav.
Hello.
I tried already to replace this functions and it still don't work. Can you help me to take some actions so i can have pagination on this theme?
Thanks,
Miguel.
-
- Junior Boarder
- GK User
- Wed Oct 16, 2013 1:16 pm
I don't know which plugin are you using, but you can add e.g. this code to gavern/helpers/helpers.layout.fragment.php file or gavern/user.functions.php:
and then in Rockwall/category.php file instead of <?php gk_content_nav(); ?> use <?php gk_paginate_navigation(); ?>
- Code: Select all
function gk_paginate_navigation() {
global $wp_query;
$big = 999999999; // need an unlikely integer
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
$args = array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?page=%#%',
'total' => $wp_query->max_num_pages,
'current' => max( 1, get_query_var('paged') ),
'show_all' => True,
'prev_next' => True,
'prev_text' => __('« Previous', GKTPLNAME),
'next_text' => __('Next »', GKTPLNAME),
);
echo paginate_links( $args );
}
and then in Rockwall/category.php file instead of <?php gk_content_nav(); ?> use <?php gk_paginate_navigation(); ?>
-
- Moderator
- GK User
- Wed Oct 16, 2013 2:15 pm
Hello Piotr.
This works!
It's possible to have some style in that numbers, like a square around the page numbers, for example?
This works!
It's possible to have some style in that numbers, like a square around the page numbers, for example?
-
- Junior Boarder
- GK User
- Wed Oct 16, 2013 2:40 pm
Yes, it's possible, in css/template.css file add this selector:
- Code: Select all
.page-numbers
- Code: Select all
.page-numbers:active,
.page-numbers:focus,
.page-numbers:hover
-
- Moderator
- GK User
- Wed Oct 16, 2013 3:46 pm
It worked like a charm!!!
Keep The good Work.
If pagination feature is to be included in next framwork version, i think it should have also a First and Last Page link.
Keep The good Work.
If pagination feature is to be included in next framwork version, i think it should have also a First and Last Page link.
-
- Junior Boarder
7 posts
• Page 1 of 1