[Resolved] Can’t get hook elements to work

Home Forums Support [Resolved] Can’t get hook elements to work

Home Forums Support Can’t get hook elements to work

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1643716
    Neil

    Hi

    I’ve been trying to use hook elements, but have never managed to get them to show up on my pages. The latest one I tried was this: https://www.wplogout.com/create-social-sharing-buttons-in-generatepress-without-plugin/ – I can’t get the social sharing icons to appear on the pages.

    I previously attempted to get Yoast breadcrumbs to work, by following step-by-step instructions, also to no avail. Can you help me figure out what I’m doing wrong? See private info for login details.

    Thank you very much!

    #1643725
    Elvin
    Staff
    Customer Support

    Hi there,

    I recommend watching the video on Hook Element found here:
    https://docs.generatepress.com/article/hooks-element-overview/

    The contents of that documents are useful info as well. Please check them out. πŸ™‚

    Here’s a brief documentation of how to add yoast breadcrumbs:
    https://docs.generatepress.com/article/adding-breadcrumbs/#using-hooks-element

    As for the article you’ve linked:

    While it’s lengthy, most are pretty much correct except maybe for step #3.

    3. Now go to the Hook Settings and Choose Hook Location as after_entry_content. Click on Execute PHP

    generate_after_entry_content should be used instead of after_entry_content. This matters because having the wrong hook will not display the the Hook Element’s code on the desired location.

    A wise man once said:
    "Have you cleared your cache?"

    #1643746
    Neil

    Hi, I do things exactly as described in the video and documentation and still nothing shows on the page. I did use generate_after_entry_content. But nothing shows. I’ve cleared all caches several times. I”m at a loss as to why the hook element doesn’t work.

    #1643750
    Neil

    Got it – I was using the hooks for posts rather than pages (which are quite different). They now show! Thanks for all your help πŸ™‚

    #1643753
    Elvin
    Staff
    Customer Support

    Got it – I was using the hooks for posts rather than pages (which are quite different). They now show! Thanks for all your help πŸ™‚

    Ah that makes sense. Yes posts and page are completely different posts types. It’s important to specify those as well.

    Glad you got it sorted. No problem. πŸ™‚

    A wise man once said:
    "Have you cleared your cache?"

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