Archived topic
hooks & Elements
13 replies · Started by Brian on September 26, 2018
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?
Hi there,
in the Chapter headings, if you replace the PHP with some static text does it then display?
Hi David,
No, It doesn't seem to.
Hmmm... are the Display Rules set?
Yes, It's set to display on the entire site.
Can you try removing the script from the legacy hook.
Hi David,
I have gone into the legacy hooks and have disabled the hook for the chapters and nothing is now coming up up.
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/
Hi David,
I have Just sent them on.
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?
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?
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:
Thanks for That David, Much Appreciated
You're welcome