Site logo

Archived topic

Content before and after slide out navigation

5 replies · Started by Kenneth on July 7, 2017

Viewing posts 1–6 of 6

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.

Hi 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.

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

You 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
}

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.

Awesome! Glad I could help :)

This archived topic is closed to new replies.