Custom Post Type Conflict on Homepage

Home Forums Calendar Products Events Calendar PRO Custom Post Type Conflict on Homepage

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31684
    Darnell
    Participant

    Sorry to reopen this topic. I didn’t notice that it had been replied to and had disabled the video slider. But now I’m revisiting this option.
    ————————————————————————
    Previous Post:
    I tried the “Integrating Post Categories & Tags” tutorial and ran into similar problems as Nick Froome when trying to display an event list on the homepage. Jonas’ fix from this link: http://wordpress.org/support/topic/plugin-the-events-calendar-showing-the-events-on-the-home-page?replies=34, worked great for the event list but it broke my video slider, which also uses custom post types. I tried adding ‘video’ to the array, but that didn’t work.

    Any suggestions???

    – Dyce
    ————————————————————————

    Jonah west asked me to elaborate, so here goes nothing:

    I have a video slider that is supposed to show on the homepage and was included with the theme (LitePress by WPZoom). It uses custom post-types to pull the videos but is currently pulling thumbs and images from random recent posts instead.

    When I remove the below code from the function.php file, the video slider works fine but The Events Calendar breaks:

    [code]add_filter(‘pre_get_posts’, ‘query_post_type’);
    function query_post_type($query) {
    if(is_category() || is_tag() || is_home() && empty( $query->query_vars[‘suppress_filters’] ) ) {
    $post_type = get_query_var(‘post_type’);
    if($post_type)
    $post_type = $post_type;
    else
    $post_type = array(‘post’,’tribe_events’,’attachment’,’nav_menu_item’,’video’);
    $query->set(‘post_type’,$post_type);
    return $query;
    }
    }[/code]

    I’m just trying to get the two plugins to play nicely together.

    #31710
    Jonah
    Participant

    Hi Darnell,

    Can you give me a little more detail as to what you’re trying to accomplish on the home page and please provide the code you are using to do so. Please paste your code to: http://snippi.com/

    Thanks,
    Jonah

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Custom Post Type Conflict on Homepage’ is closed to new replies.