[Resolved] Hook in the middle of sidebar

Home Forums Support [Resolved] Hook in the middle of sidebar

Home Forums Support Hook in the middle of sidebar

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1566449
    Matic

    Hi,

    let me start by saying how much I love Hooks in GeneratePress.

    Is it possible to insert a hook in the middle of the sidebar?

    Here an example link on my website: https://www.photutorial.com/stock-photography/
    The child 1 and 2 (both ads) are manually inserted with Hooks (generate_before_right_sidebar_content) and then there are 3 (Popular posts) and 4 (about me), both of which were added Appearance > Customize > Add to sidebar.
    Is it possible to rearrange these without making a whole sidebar with elements? (= I could create an entire Right sidebar with elements, but it would be a lot less convenient).
    I would like the Popular posts to always be on top.

    Cheers,
    Matic

    #1566546
    Leo
    Staff
    Customer Support

    Hi there,

    What kind of code are you adding using the hook?

    Are you able to just add it using a custom HTML widget so you can arrange the widget however you want?

    Let me know πŸ™‚

    #1566757
    Matic

    Hi, it’s is indeed just a line of an HTML code, but I do it using hooks because I want certain ads in certain categories. For example, I don’t want Shutterstock adds in Category “Inspiration”, and that’s only possible to do with your hooks.

    EDIT: I fixed the problem by also hooking the Popular posts PHP and giving it a priority 1, and 2 and 3 to the ads. Thinking back, that probably what you meant πŸ™‚

    Problem resolved.

    #1567566
    Leo
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.