-
Author
Tagged: after_main, sidebars, page parts, before_content
-
July 26, 2015 at 07:38 #70042mitchcanParticipant
I know what you’re thinking… “are you freakin’ kidding me? another question on page parts?”
In my defense, if there was a single resource for all of the locations I could hook in to, I promise I wouldn’t ask so much. I really like Kleo, but in my last theme there was an entire plugin that listed every single hook opportunity, where it was and how to use it… great stuff that made it easy (and made for less questions). 🙂
Anyhoo, I think I’m confused. (I know, nothing new, right?) 🙂
I thought ‘kleo_before_content’ was an area on TOP of the content and sidebar(s). But when I have
COPY CODEadd_action('kleo_before_content','kleo_before_content_sidebar'); function kleo_before_content_sidebar() { echo '<div id="before-content-sidebar">', do_shortcode('[widgets_on_pages id="wop-2"]'), '</div>'; }
it generates a 40px x 4430px block down the left side of the page. It doesn’t matter if it is a sidebar page or a fullwidth page, it’s there either way.
Did I mistakenly understand where this area is? or did I code the name in wrong? or is that just the way it is?
In this case, I was just looking for the ability to put a custom ‘sidebar’ in the area that ran across the TOP of BOTH the main content and the (traditional) sidebar(s). Like ‘kleo_before_main_content’ goes just above the content.
Does such a thing exist? 🙂
Thanks.
July 26, 2015 at 08:17 #70044mitchcanParticipanthey, I think I found it in going through old code.
kleo_before_main right?
sheeesh all the names got me a little confuddled. Please LMK if I am missing any others, but I’ll work with what I gots until then. 🙂
Thanks.
July 26, 2015 at 11:26 #70052mitchcanParticipantHere’s all I could find. I went through page-parts and other places looking for others. Am I missing any?
kleo_before_main — above content incl SB, below header/menu (above breadcrumb if apply)
kleo_before_content — adds sidebar-like column to the left of main-content (hmm?)
kleo_before_main_content — above the main content only, not SB (incl above page title if apply)
kleo_after_main_content — below the main content only, not SB
kleo_after_content — adds sidebar-like column to the right of main-content (hmm?)
kleo_after_main — below content incl SB, above footer
I’m curious on the kleo_before_content and kleo_after_content … is this the intended functionality for those?
I now have a nice, neat list. 🙂 Please LMK if there are others.
Thanks.
July 27, 2015 at 13:23 #70181AbeKeymasterHi there, yes that is the list with actions and we will definitely add a nice list to the documentation. To display something before the content and the sidebar you should use “kleo_before_content action” since it adds content right before the content and sidebar
Let me know if I understood your question right or you need any extra details.
ThanksHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.July 27, 2015 at 13:47 #70184AbeKeymasterI added it to the docs with what I got now and will continue to update it: https://archived.seventhqueen.com/documentation/kleo#hooks
Thanks
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.July 28, 2015 at 01:32 #70325mitchcanParticipantOK, thanks. A nice reference point in the docs will be helpful.
A question on kleo_before_content
For me, using this seems to add a vertical, almost sidebar-like section on a post/page, just before (beside) the main_content and sidebar areas. I was expecting this area to be a *horizontal* area, above both the main and the sidebar(s), but BELOW the breadcrumb (being that _before_main was already there ABOVE the breadcrumb).
Can _kleo_before_content work like I was expecting? Or is this simply not the case?
Thanks.
July 28, 2015 at 12:23 #70360AbeKeymasteryes that is exactly what kleo_before_content hook does, it allows you to add something before main and sidebar content and it should be horizontal all the way.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.July 28, 2015 at 13:01 #70371mitchcanParticipantwelp, then I have broken something. 🙂
I get a *vertical* placement for both kleo_before_content and kleo_after_content. If I add a widget in those areas, it acts likes another vertical sidebar, breaking the page into halves or thirds, vertically.
What should I look at that might be causing this?
Thanks.
July 29, 2015 at 17:57 #70580AbeKeymasterGive a link to your page to take a quick look
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.July 29, 2015 at 19:49 #70595mitchcanParticipantWell, I’ve commented out that code in functions because it was making the pages wonky.
I’ll go back in and activate it and then put some content in those areas on a single page, and then add a link here.
July 31, 2015 at 23:53 #71016AbeKeymastervery strange.. Please update the file located in page-parts/general-before-wrap.php with the one attached. This should fix your issue and this change will be included in the next update too.
In addition to the code above, now you will add the content in a container like:
COPY CODEecho '<div class="container" id="side-before-content-sidebar">', do_shortcode('[widgets_on_pages id="wop-3"]'), '</div>'; //you could put a shortcode here if you want, too.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.Attachments:
You must be logged in to view attached files.August 1, 2015 at 01:10 #71039mitchcanParticipantYeah, it was really weird. Thanks for looking at it, I’ll update here once I have applied the fix.
But hey, my apologies in advance for asking a dumb question, but I don’t see an attached file anywhere. Where would I see the file? Am I looking in the wrong spots?
Thanks.
August 1, 2015 at 17:58 #71100AbeKeymasterJust reattached it. Don’t know what happened 🙂
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.August 1, 2015 at 20:58 #71135mitchcanParticipantOK, so that worked fine. Thanks.
However, wouldn’t we need to do the same thing with the kleo_after_main_content also? I ask because while the attached resolved the before issue, even though I added a container to the after also, it is still a display problem.
I would mess with general-after-wrap like what was done with general-before-wrap, but I’m not sure exactly what to do, so any help there would be great.
Thanks.
P.S. Do I get some kind of award for having your post number 10,000? 🙂
August 2, 2015 at 00:22 #71164mitchcanParticipantI see you already pushed 3.0.6 with the before-wrap change, cool. I still need to fix the after-wrap. Thought I’d try this… so in general-after-wrap, would I put
COPY CODE<section class="container-wrap main-color"> <div id="main-container" class="<?php echo $container; ?>"> <?php if($container == 'container') { ?><div class="row"> <?php } ?> <div <?php echo $section_id;?>class="template-page <?php echo $main_tpl_classes; ?>"> <div class="wrap-content">
on Line 20 after
</div><!--end main-page-template-->
or would there be anything else I’d need to do?
I’m working without an net on a live site (tsk tsk) 🙂 so I just don’t want to screw it up.
Thanks.
August 10, 2015 at 11:44 #72390AbeKeymasterSorry for the late reply. If you want to put something after the content and sidebar you can use kleo_after_main
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.August 23, 2015 at 17:44 #74229mitchcanParticipantHey, just to update this and close it out. It looks like I don’t have any more issues with this. It was a good exercise though, after digging through all the code, I found a total of 10 places that it looks like I can hook into. Cool. 🙂
Thanks.
Attachments:
You must be logged in to view attached files. -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.