Support

Account

Home Forums General Issues WP-PageNavi

Solving

WP-PageNavi

    • Svenni

    • July 18, 2013 at 6:16 am

    Hi,

    is there a chance to get WP-PageNavi working with ACF and the repeater field? WP-PageNavi works fine on “normal” pages and posts, but all attemps to get it work with the repeater field (and normal WYSIWYG fields) failed. πŸ™

    Greetings,
    Svenni

    • Elliot

    • July 18, 2013 at 3:09 pm

    Hi @svenni

    Thanks for the bug report.

    I am yet to use this plugin, but will take a look in the future.
    Can you provide details on what the current bug is?

    • Svenni

    • July 19, 2013 at 11:37 pm

    Hi Elliot,

    at the moment I don’t know if it’s a real bug or a bug in programming, so an example with WP-PageNavi installed and integrated in page template:

    sample text:

    site 1
    <!--nextpage-->
    site 2
    <!--nextpage-->
    site 3

    sample text after clicking html button:

    <p>site 1</p>
    <p><!--nextpage--></p>
    <p>site 2</p>
    <p><!--nextpage--></p>
    <p>site 2</p>

    correct result in frontend if you put it in wp standard content field:

    site 1
    
    Pages: 1 2 3

    result in frontend if you put it eg. in ACF WYSIWYG field:

    site 1
    
    site 2
    
    site 3

    I use normal code in template to output acf field like this:

    <?php the_field("pagenavi-site");?>

    Grettings,
    Svenni

    • Elliot

    • July 20, 2013 at 11:25 am

    Hi @svenni

    Thanks for the debugging info.

    I think the wp-pagenavi plugin is hooking into the the_content filter and modifying the value based on the comments.

    In fact, I’m 99% sure it is.

    All you need to do is run the the_content filter on the ACF value, and your output will render correctly!

    
    echo apply_filters('the_content', get_field("pagenavi-site"));
    
    • Svenni

    • July 20, 2013 at 7:41 pm

    Hi Elliot,

    no, this don’t work. I tested it in a lot of versions the last days and now again – with the same result:

    site 1
    
    site 2
    
    site 3

    πŸ™

    Greetings,
    Svenni

    • Elliot

    • July 22, 2013 at 12:35 pm

    Hi @svenni

    Are you sue WP Page navi has a shortcode for this?

    I just looked at the installation guide, and can’t see any shortcode functionality.
    I also searched the source code and found no reference to the_content, !–, or shortcode.

    Are you assuming this functionality exists?

    • Svenni

    • July 23, 2013 at 2:40 am

    Hi elliot,

    I don’t think that it is working with a shortcode. For making a page break you must use

    <!--nextpage-->

    which is’nt a shortcode, or I’m wrong with it? It’s like the standard

    <!--more-->

    of WordPress. This isn’t working, too, how I tested after writing about

    <!--more-->

    .

    Greetings,
    Svenni

    • Elliot

    • July 23, 2013 at 1:18 pm

    Hi @svenni

    Just to confirm. Are you 100% sure the ‘

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.