[Resolved] hooks & Elements

Home Forums Support [Resolved] hooks & Elements

Home Forums Support hooks & Elements

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #686779
    Brian

    Hi,

    I am trying to migrate hooks into elements but I am having limited success. I have added one hook which appears twice but I have also added others which only display once, meaning that the elements must not yet be working, One of them is chapter headings which uses php. I have ticked the execute php box but where I should be seeing 2, I only see one. What am I doing wrong?

    #686875
    David
    Staff
    Customer Support

    Hi there,

    in the Chapter headings, if you replace the PHP with some static text does it then display?

    #686885
    Brian

    Hi David,

    No, It doesn’t seem to.

    #686907
    David
    Staff
    Customer Support

    Hmmm… are the Display Rules set?

    #687055
    Brian

    Yes, It’s set to display on the entire site.

    #687108
    David
    Staff
    Customer Support

    Can you try removing the script from the legacy hook.

    #687424
    Brian

    Hi David,

    I have gone into the legacy hooks and have disabled the hook for the chapters and nothing is now coming up up.

    #687534
    David
    Staff
    Customer Support

    Would you be ok to share admin login with us?
    If so you can send it via the account issues form, please reference this topic URL:
    https://generatepress.com/contact/

    #687832
    Brian

    Hi David,

    I have Just sent them on.

    #687848
    David
    Staff
    Customer Support

    Hi there,

    i moved the new hook to after_entry_header and reduced the priority to 5 so its now between the title and the audio button. Is that correct?

    #687993
    Brian

    Hi David,

    No, it needs to be before the title, centred but when I put it into that it wouldn’t work. I messed around with it a bit and put into before main content with priority of 5 and it seems to work, but I don’t understand why it wouldn’t work on the previous settings, what was I doing wrong?

    #688001
    David
    Staff
    Customer Support

    Glad you found the solution.
    The before_entry_title doesn’t exist on the Page template only the single post.
    This visual guide may be of use:

    https://docs.generatepress.com/article/hooks-visual-guide/

    #688532
    Brian

    Thanks for That David, Much Appreciated

    #688660
    David
    Staff
    Customer Support

    You’re welcome

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