[Resolved] Content before and after slide out navigation

Home Forums Support [Resolved] Content before and after slide out navigation

Home Forums Support Content before and after slide out navigation

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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.

    #345863
    Tom
    Lead Developer
    Lead Developer

    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.

    #345958
    Kenneth

    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

    #346095
    Tom
    Lead Developer
    Lead Developer

    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
    }
    #346292
    Kenneth

    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.

    #346298
    Tom
    Lead Developer
    Lead Developer

    Awesome! Glad I could help 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.