Support

Home Forums Event Espresso Premium Previous and Next order in a "TwentySeventeen" based theme

Previous and Next order in a "TwentySeventeen" based theme

Posted: August 9, 2021 at 8:50 am

Viewing 2 reply threads


ICLE

August 9, 2021 at 8:50 am

I have attempted to use the snippet at:
https://gist.github.com/joshfeck/a8e28b9cfecd89308fbea4c152f546c9/revisions

TwentySeventeen
Looked at the code on \\template-parts\page\content-page.php and found this suspect line:
<?php
the_content();

wp_link_pages(
array(
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
'after' => '</div>',
)
);
?>

Does not appear to work. Any tips?


Tony

  • Support Staff

August 11, 2021 at 8:26 am

Hi ICLE,

When you say the theme is based on TwentySeventeen, is it a child theme of twentyseventeen you are using or a custom theme based on it?

Unless I’m missing something obvious here the output would not be from \template-parts\page\content-page.php if you are viewing an EE event single post, it would be from single.php and likely use the_post_navigation() (which then uses the functions targeted by the above snippet).

I tested the snippet you posted with the default twentyseventeen theme and it works for me when, you can see it when using something like Debug bar to view the queries on the page.

Without the snippet:

https://monosnap.com/file/pgqMYGmfKPQAGZy4TcPuzNzhoJ2qG4

With the snippet:

https://monosnap.com/file/6GZZuzrBITYRsrPIfB6cGywtvD2BKz

What is happening on your site for you to say its not working?


ICLE

August 11, 2021 at 8:57 am

Yes, I am using a child theme of twentyseventeen. Thank you for the comments regarding which PHP file was actually being used. I will set that page up in my child theme and try it out.

Viewing 2 reply threads

The support post ‘Previous and Next order in a "TwentySeventeen" based theme’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso