[Resolved] Blog paging – Pagenavi styles?

Home Forums Support [Resolved] Blog paging – Pagenavi styles?

Home Forums Support Blog paging – Pagenavi styles?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #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.com

    #39177
    Tom
    Lead Developer
    Lead Developer

    Hi 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!

    #39380
    Tobias Hjorth

    You’re the man. Thanks for your Work and this awesome theme

    #39398
    Tom
    Lead Developer
    Lead Developer

    Alright, 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;
    }
    #39411
    Tobias 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;
    }
    #39597
    Tom
    Lead Developer
    Lead Developer

    The .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.

    #39614
    Tobias Hjorth

    Worked like a charm. Thanks again Tom for your support! πŸ™‚

    #39615
    Tom
    Lead Developer
    Lead Developer

    Glad I could help πŸ™‚

    #146245
    erni74

    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?

    #146318
    Tom
    Lead Developer
    Lead Developer

    Hi 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/

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.