-
Author
-
July 17, 2015 at 03:42 #68648mitchcanParticipant
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.
July 17, 2015 at 13:51 #68676sharmstrModeratorkleo_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 CODEadd_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 solutionThis 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.July 17, 2015 at 19:45 #68769mitchcanParticipantAs usual 🙂 I stand corrected.
I had placed:
before_main
before_content
after_mainin 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!
-
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.