This topic has 2 replies, 2 voices, and was last updated 8 years by mitchcan.

  • Author

    Tagged: ,

  • #68648
     mitchcan
    Participant

    I found your posts about adding content in places like:

    (‘kleo_before_content’);
    (‘kleo_before_main_content’);

    Nice, thanks. But both of those seem to add content that goes across the entirety of the page area (including above the sidebar).

    How would I add some content where it would ONLY be displayed above the area defined (as I can see it in Inspect Element) as <div class=”template-page col-sm-9 tpl-right”> or <div class=”wrap-content”>? Or whatever the area only above the content, not the sidebar is?

    Thanks.

    #68676
     sharmstr
    Moderator

    kleo_before_main_content does. Not sure why you’re seeing it stretch across the top of sidebar. If I put this in my functions.php file, it echos text just in the main content section. Not in the above the sidebar. See the attached and note the sidebar border extending to the top as it should. Also attached is the resulting html source code.

    COPY CODE
    
    add_action('kleo_before_main_content','my_custom_content_header');
    function my_custom_content_header() {
         echo "This is my custom text";
     }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    Attachments:
    You must be logged in to view attached files.
    #68769
     mitchcan
    Participant

    As usual 🙂 I stand corrected.

    I had placed:

    before_main
    before_content
    after_main

    in a custom functions. But in simple confusion over names looks like I had neglected ‘before_main_content’. What I was seeing on the page was content in the ‘before_content’. My bad.

    Added and resolved. Thanks as always for making me rethink what the heck I’m doing. Have a great weekend!

Viewing 3 posts - 1 through 3 (of 3 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?