Strange Double Rendering with Thesis

Home Forums Calendar Products Events Calendar PRO Strange Double Rendering with Thesis

Viewing 15 posts - 31 through 45 (of 65 total)
  • Author
    Posts
  • #16110
    Ross
    Member

    I got it to work but I altered the one of the true false statements in the function. Strange.

    #16132
    Carlos
    Participant

    Ok for the next trick….looks like everything work perfectly until you get to a month that doesn’t have an event
    http://sustainableelements.ca/se/test/2012-04/
    Sounds similar to an issue I saw brought up in a different thread .

    Ideas, thoughts, snippets of code?

    #16145
    Carlos
    Participant

    Need to add one more request here. The look of the single event post in thesis isn’t the best. http://sustainableelements.ca/se/event/globe-2012-welcome-reception/

    I think it will improve with the ability to remove one of the two default sidebars from the single event post. I found a way to do it courtesy of the guys at Thesis but I don’t know how to direct it to work for the single event post type as opposed to home. Any chance you guys could direct me how to change the reference in the code in the following link.
    http://diythemes.com/thesis/rtfm/one-sidebar-certain-pages-only/

    Thanks guys! Oh and I checked out the images for the conference add-on….absolutely amazing!! Wish I could get my hands on it ASAP for some thing next week but looks like I’ll need to hang tight till the summer.
    C

    #16165
    Rob
    Member

    Alright, thanks guys. Let me see what else Jonah can share here. If any other issues arise beyond the initial one here, let’s create a new thread for that so as not to create confusion.

    Oh, and Carlos: thanks for the words on Conference Manager! If you want to be a beta tester when we ultimately have a beta available (which is admittedly still a ways out), I’ll save you a slot. Just email me as a reminder when you see it announced here on the forums or our Facebook/Twitter pages. Cheers!

    #16169
    Carlos
    Participant

    Look forward to seeing what Jonah can come up with :). I wasn’t sure whether to start a new feed as it was all thesis template related, but for sure the next thing that comes up (or if Jonah wants to start a new thread) then I’ll be surround start a new thread up.

    And I will most definetly take you up on the beta slot for the conference manager.
    C

    #16219
    Jonah
    Participant

    Carlos, the code I posted shows you how to conditionally set the number of sidebars on single events, the events list, and the grid view. Does this not work for you?

    #16220
    Jonah
    Participant

    … the code I posted on page 2.

    #16226
    Carlos
    Participant

    Hey Jonah, the conditional code works perfect for removing all sidebars, but what I’m looking for is to show only one sidebar. The Thesis code in the link in my previous post allows the user to dictate the number of sidebars showing and which one is showing, making it more powerful than the conditional all or nothing. I just don’t know what code to use to call the custom post types that ECP uses to replace the reference the Thesis code uses for the home page. Excuse my lack of code knowledge, maybe the answer is in the code you posted previously…I’m just not up to speed enough to know what to look for.

    #16230
    Jonah
    Participant

    Ahhh I see, sorry I misunderstood earlier…

    So all you need to do is; after you’ve removed all sidebars, then conditionally set specific pages to use only one sidebar like so:


    // Restore sidebar 1 to layout
    function restore_sidebar(){

    if('tribe_events' == get_post_type()) {

    if ( is_single() && !tribe_is_showing_all() ) { // single event ?>

    <?php }

    } else {

    }

    }
    add_action('thesis_hook_content_box_bottom','restore_sidebar',1);


    // Add a class for styling
    function one_sidebar($classes) {

    if('tribe_events' == get_post_type()) {

    if ( is_single() && !tribe_is_showing_all() ) { // single event

    $classes[] = 'one_sidebar';

    } elseif ( tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || (is_single() && tribe_is_showing_all()) ) { // list view

    $classes[] = 'one_sidebar';

    } else { // grid view

    $classes[] = 'one_sidebar';

    }

    } else {

    $classes[] = 'one_sidebar';

    }
    return $classes;

    }
    add_filter('thesis_body_classes', 'one_sidebar');

    Then just add your css like they indicated:

    .custom .no_sidebars #content { width: 51.4em; }
    .custom.one_sidebar #container { width: 100em; }
    .custom.one_sidebar #sidebars { width: 21.7em; }

    Basically, you’re using the same conditional code but with the additional function to conditionally add sidebars back to specific pages…

    Hopefully that points you in the right direction!

    #16231
    Jonah
    Participant

    Sorry, code got botched above, try this: http://pastebin.com/gbE2LjiM

    #16241
    Ross
    Member

    I have been having problems with the body classes as well. I thought I would try the function you have but the problem I am having is no matter how I write this code it just adds this body class to ever page. It seems that if you are using the widget then it just adds the class to every page.

    #16242
    Ross
    Member

    Alright here,

    After some investigating here is a better description of my problem:

    On the Event List page or “Upcoming Shows” page where the show feed propagates it inherits the body class in Thesis and the page id for the first upcoming show (This is just a problem with WordPress and not Thesis). I have been trying to write CSS to hide the headline of the Upcoming Shows page because writing a thesis function to unhook the headline causes it to unhook all the headers for all single events and the upcoming shows page but none of it works. I even tried writing a custom function to add custom body classes for the list and the single show posts and it applies it to every page (I suspect because I am using the widgetized version on every page as well).

    You also can’t write functions for the list view page because it technically has no page title. You can’t target this page based off of CSS Class (Thesis), page ID, or page title.

    I have a launch in 4 days, and most of the site is based on this system. I’ve never had problems with it but most of my production time was spent trying to fix your bugs. It would be nice to have this addressed in the next version.

    #16262
    Jonah
    Participant

    Hey Ross, these are not bugs, these are just differences in how themes interact with our plugin. We are making changes to the templating system so that event pages will be more like actual WordPress pages, but this is not fixing anything that was broken. It’s simply improving upon what we currently have.

    Also, the above code may not be exactly what you need for your setup – you need to have an understanding of both Thesis, PHP and our plugin to understand what’s going on. For instance, the conditional code that adds the body class sets the default body class to ‘one_sidebar’ if none of the other conditions are met. So this is probably why you are seeing it applied on every page. If you don’t want that, simply remove that part of the code.

    #16311
    Carlos
    Participant

    Great job Jonah! Took a little tweaking but I’ve got things looking the way I need them.

    Any luck with making the layout of the grid view that has no events match the ones that do (see my comment at the top of this page)
    http://sustainableelements.ca/se/test/2012-04/
    Notice that the sidebars are present whereas the March grid view does not have sidebars.

    Thanks!
    C

    #16355
    Rob
    Member

    Carlos: awesome to hear you’re on the right path there, visually! Will have Jonah take a look as to the layout point you mentioned most recently when he hits the forums today.

Viewing 15 posts - 31 through 45 (of 65 total)
  • The topic ‘Strange Double Rendering with Thesis’ is closed to new replies.