- This topic has 9 replies, 2 voices, and was last updated 3 years ago by Tom.
April 17, 2018 at 4:34 am #552559Bill
On the latest version of GP I’ve noticed that the function in page.php
Doesn’t work, it should be:
Working in local host
ThanksGeneratePress 2.0.2GP Premium 1.6.2April 17, 2018 at 8:56 am #552858TomLead DeveloperLead Developer
Those are two different hooks in different locations.
generate_after_contentcan be found in content-page.php: https://github.com/tomusborne/generatepress/blob/2.0.2/content-page.php#L60April 17, 2018 at 9:06 am #552871Bill
Thanks for your fast reply as always, much appreciated.
Ah, I’m using, front-page.php and the original hook I took from page.php
do_action(generate_after_main_content)didn’t work, changing it to
do_action(generate_after_content)works fine though, is that a bug?April 17, 2018 at 9:09 am #552873Bill
Hey Tom, Looks like it was that NexGEN Gallery again.. Gets me everytime. Might be worth putting a warning that the plugin is not compatible with GP until they fix it. Thanks for your time.
That is not correct, sorry.April 17, 2018 at 9:11 am #552874TomLead DeveloperLead Developer
What about it didn’t work? If you have a function hooking into
generate_after_content, then calling
generate_after_main_contentwon’t work. The hook names need to match up between the template and the function.April 17, 2018 at 9:11 am #552875TomLead DeveloperLead DeveloperApril 17, 2018 at 9:14 am #552878Bill
Sorry Tom, its been one of those days..
I tried to put some code into
After Contentin GP Hooks but it wouldn’t show.
It does however work if I change to
ThanksApril 17, 2018 at 9:15 am #552882TomLead DeveloperLead Developer
Ah, got it. Hooks is getting a total makeover which will allow you to use any hook that exists in the theme. Should make it waaay easier 🙂April 17, 2018 at 9:21 am #552888Bill
Sounds great, thanks a lot for your help, love the theme and plugin, keep up the hard work 🙂April 17, 2018 at 9:24 am #552892
- You must be logged in to reply to this topic.