Archived topic
Trying to not show hooks on home page (latest posts)
30 replies · Started by itg on March 30, 2020
ok i have updated and elements is now showing
but i am getting this error
DISALLOW_FILE_EDIT is defined. You should also disallow PHP execution in GP Hooks.
It's explained here:
https://docs.generatepress.com/article/disallow-php-execution/
You don't need to worry about it if you aren't using PHP in hooks - the display rules replace the need to use PHP.
If you have other existing hook content then I would recommend migrating to hooks elements:
https://docs.generatepress.com/article/moving-hooks-page-headers-to-elements/
ok i have installed new version of gp, and created a new element, now my hooks have disappered, there is no navigation to the hooks argggggg what am i doing wrong here?
I dont know where the hook is now and its content, why is this so confusing, must just be e
I dont understand how a simple thing like pasting a piece of code is turning into a huge problem that requires watching tutorials and reading pages of instructions. I always used gp for its ease of use. Now with each update its getting more and more technical. Why cant we just keep it all simple?
ok i found the hooks eventually under legacy hooks and i have created an new elemet, but still not working for me. I am using the same code.
Ok i watched the video leo on merging or migrating the hook now to an element and i am even more confused than when i started. Sorry not my strong point.
Let's take it one step at the time.
Have you tried the steps here?
https://generatepress.com/forums/topic/trying-to-not-show-hooks-on-home-page-latest-posts/#post-1219962
https://generatepress.com/forums/topic/trying-to-not-show-hooks-on-home-page-latest-posts/#post-1219964
yes have followed all your steps without sucess, thank you leo
This is the content you are currently adding:
https://www.screencast.com/t/yiNuWTwYjL
Can you try adding the content I specified here (copy and paste)?
https://generatepress.com/forums/topic/trying-to-not-show-hooks-on-home-page-latest-posts/#post-1219964
The display rules tab replaces the need for PHP conditional statement. <?php if ( ! is_front_page() && ! is_home() ) : ?>
i have done what you said and think its has worked, does it look ok to you Leo?
Yup that looks good :)
ok thanks leo
one last question is it ok to ignore this
DISALLOW_FILE_EDIT is defined. You should also disallow PHP execution in GP Hooks. Learn how
Yup you can ignore that no problem.
If you have nothing else in the old GP hooks, then you can disable the module as well:
https://docs.generatepress.com/article/installing-gp-premium/#activate-your-modules
thanks leo your a real help, take care during these troubled times....