- This topic has 5 replies, 2 voices, and was last updated 3 years, 9 months ago by
Tom.
-
AuthorPosts
-
July 7, 2017 at 3:13 pm #345800
Kenneth
Hi all,
I was customizing my slide out menu and I added some content before the slide navigation with this code (I used the Code Snippets plugin to do this):
add_action( ‘generate_inside_slideout_navigation’,’add_slideout_content’ );
function add_slideout_content()
{
?>
[here is my content]
<?php
}And voila, there was my content.
Now i want to add some content after the slide out navigation. I know about the [generate_after_slideout_navigation] hook. My simple thought was to replace the [generate_inside_slideout_navigation] hook with the [generate_after_slideout_navigation] hook. I added the code in a new snippet. I activated it and I got a code 500 error. No worries, im prepared for this kinda trouble and got my backups up and running. But my question is, what am i doing wrong? Both snippets where activated.
Sorry, if im a bit confusing. And for my bad grammer.
Thanks in advance.
July 7, 2017 at 7:35 pm #345863Tom
Lead DeveloperLead DeveloperHi there,
Can you show me the exact code you’re trying to add that created the error? Simply replacing the hook name shouldn’t mess anything up, but maybe there’s something small that’s missing.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJuly 8, 2017 at 1:45 am #345958Kenneth
Hi tom,
Yes ofcourse, this is the code:
add_action( ‘generate_after_slideout_navigation’,’add_after_slideout_content’ ); function add_after_slideout_content() { ?> [here is my content] <?php }
Thanks in advance Tom
July 8, 2017 at 10:49 am #346095Tom
Lead DeveloperLead DeveloperYou have some “curly” quotes in there.
Try this:
add_action( 'generate_after_slideout_navigation', 'add_after_slideout_content' ); function add_after_slideout_content() { ?> [here is my content] <?php }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJuly 9, 2017 at 12:24 am #346292Kenneth
Hi Tom
Thanks, I wil check my code better next time before i bother you with it haha. It worked out amazing, I really like it. I will put my website in showcase, I think you will really like it.
July 9, 2017 at 12:27 am #346298Tom
Lead DeveloperLead DeveloperAwesome! Glad I could help 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.