Help Desk

Issues with ajax next/previous month

  • Posts: 15 Topics: 6
    | Permalink

    My events page is here http://www.gocolorado.com/events if you click on next or previous month you will see the layout gets messed up. What might be causing this? Also I was using is_post_type(‘tribe_events’)to remove the featured slider and ad in my Genesis Hooks but it will revert to the default layout when navigating the calender between each month.

    Posts: 15 Topics: 6
    | Permalink

    FYI I am using my Default Page Template, when I switch to Default Events Template it does not do this.

    Posts: 15 Topics: 6
    | Permalink

    Update. I got it working by using template overrides and just using the Default Events Template. However my only problem now is I am using this http://dev.studiopress.com/display-alternate-sidebar.htm in order to add a custom sidebar to the page. The is_page_template( ” ) isn’t working to interject the side bar so instead I am using is_post_type(‘tribe_events’) which works but if I navigate months on the calender and hit Refresh it will load the default sidebar instead of the custom one.

    Posts: 15 Topics: 6
    | Permalink

    Oh and one last thing, why arebreadcrumbs showing at the top of the page?

    Posts: 4278 Topics: 105 Answers: 467
    | Permalink

    Hey Cary. Excellent to hear you’ve been able to make progress on this one yourself; sounds like with regards to the sidebar issue, you need some help. I’m going to get our developer to check on that since it’s a bit outside my area of expertise.

    On the breadcrumbs: those should be dictated by your theme, since they aren’t in the code by default to display on the 2011 theme. Are you just trying to hide them?

    Posts: 4021 Topics: 4 Answers: 763
    | Permalink

    Hi Cary,

    is_post_type() was a conditional only briefly available in 3.0 development and shouldn’t work anymore – try:

    if ( ‘tribe_events’ == get_post_type() ) … instead.

    Hmmm, for some reason it looks like that does not return true when when you refresh the page though… I’m going to bring this up with the devs but I think use can use:

    if ( tribe_is_month()) { … and that will return true.

    Let me know if you need anything else.

    Thanks,
    Jonah

    Posts: 15 Topics: 6
    | Permalink

    Ok thanks a lot! So I think it wasn’t returning true because I was using a function which allowed for the use of is_post_type() and there might have been a conflict. I removed that function and instead replaced all instances of that with ” == get_post_type(). Everything is working as I wasn’t with my custom side bar except when I view individual event pages its still showing my default sidebar. This is what I am using for replacing the sidebar… if ( ‘tribe_events’ == get_post_type() || tribe_is_month() || tribe_is_upcoming())

    Posts: 15 Topics: 6
    | Permalink

    Ok i got everything figured out! Thanks again.

    Posts: 4021 Topics: 4 Answers: 763
    | Permalink

    Sounds good Cary, glad you got it worked out!

    – Jonah