Site logo

[Support request] Page template for Event

Home Forums Support [Support request] Page template for Event

Home Forums Support Page template for Event

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #355229
    Siger

    Hi
    I want to display events on my site. I build the page with Elementor, and would like to add

    before Elementor starts and

    when it ends. So this must be done in the GP page template, I guess.
    What’s the best way to do this? I use the standard page template.

    Thanks

    #355263
    Leo
    Staff
    Customer Support

    Hi there,

    I think GP hooks would be the way. Check it out here:
    https://docs.generatepress.com/article/hooks-overview/
    http://demo.generatepress.com/hook-locations/

    Let us know if this helps.

    #355279
    Siger

    Thanks, button when I use hooks it will appear on every page, I only want it to show on pages with an event. I know I could filter on page id,but I rather woud like to choose a template. But which one do I have to modify? Or duplicate in my child theme?

    #355289
    Leo
    Staff
    Customer Support

    You can use WordPress conditional in the hooks. I believe this is what you are looking for:
    https://codex.wordpress.org/Conditional_Tags#Is_a_Page_Template

    #355619
    Siger

    Thank for your answer Leo,

    But that’s not quite what I am looking for, because there are no specific conditions to filter on.. 🙂 So let’s rephrase the question: Which template file do I have to duplicate so I can choose a different page template instead of the standard?

    Thanks!

    #356047
    Tom
    Lead Developer
    Lead Developer

    You could duplicate page.php.

    There’s lots of good info here: https://developer.wordpress.org/themes/template-files-section/page-template-files/

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