- This topic has 9 replies, 3 voices, and was last updated 10 years, 4 months ago by
Tom.
-
AuthorPosts
-
October 14, 2014 at 2:15 pm #39174
Tobias Hjorth
Hi
Thanks again for a great theme.
I have a question for the page navigation when Masonry is disabled. I can’t figure where I can replace the standard paging (1 2 … 75 Next →) with the easier pagenavi plugin. Can you give a hint to where I should replace the code?Thanks again
Tobias Hjorth
http://www.tobiashjorth.comOctober 14, 2014 at 2:25 pm #39177Tom
Lead DeveloperLead DeveloperHi Tobias,
I actually just included a new hook in the theme that will allow you to hide the current page navigation and add your own (pagenavi).
Hoping to have the new version out this week, and will revisit this thread once that happens with the code you can use.
Thanks!
October 15, 2014 at 11:49 am #39380Tobias Hjorth
You’re the man. Thanks for your Work and this awesome theme
October 15, 2014 at 2:51 pm #39398Tom
Lead DeveloperLead DeveloperAlright, with the new version out, you can do the following:
First, create a new plugin using “Pluginception”: https://wordpress.org/plugins/pluginception/
In your plugin, add this code:
https://gist.github.com/generatepress/dba8ffb102ece3152237
Then, add this CSS (in your style.css or Custom CSS plugin) to hide the default navigation:
.page-numbers { display: none; }October 16, 2014 at 1:33 am #39411Tobias Hjorth
Hi again Tom
Thank you so much for your effort.
A bit of a coding newbie here, but the plugin gives me an fatal error. I’m sure I’m doing it wrong:<?php /* Plugin Name: Generatepagenavi Plugin URI: Description: Version: Author: Author URI: License: License URI: */ add_action('generate_paging_navigation','generate_pagenavi_integration'); function generate_pagenavi_integration() { wp_pagenavi(); } .page-numbers { display: none; }October 16, 2014 at 12:06 pm #39597Tom
Lead DeveloperLead DeveloperThe .page-numbers part should go in your CSS, as it’s not PHP.
If you remove that and add it to your CSS, you should be good to go.
October 16, 2014 at 12:30 pm #39614Tobias Hjorth
Worked like a charm. Thanks again Tom for your support! 🙂
October 16, 2014 at 12:32 pm #39615Tom
Lead DeveloperLead DeveloperGlad I could help 🙂
October 21, 2015 at 8:08 am #146245erni74
Hello,
I have a question for the page navigation. Where I can replace the standard paging (1 2 … 75 Next →) with the easier pagenavi plugin?
October 21, 2015 at 11:56 am #146318Tom
Lead DeveloperLead DeveloperHi there,
You can add this PHP:
add_action('generate_paging_navigation','generate_pagenavi_integration'); function generate_pagenavi_integration() { wp_pagenavi(); }Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/
Then this CSS:
.page-numbers { display: none; }Adding CSS: https://generatepress.com/knowledgebase/adding-css/
-
AuthorPosts
- You must be logged in to reply to this topic.