ECP posts missing from blog front page

Home Forums Calendar Products Events Calendar PRO ECP posts missing from blog front page

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #17945
    Carlos
    Participant

    Some reason the ECP posts are missing from my blog front page. Anyone had a similar problem? Was definitely working with ECP 2.04. Turned off all plugins and still have the same issue. Wiped out custom Thesis functions still no luck.

    C

    ECP 2.05/Thesis 1.8

    #17962
    Rob
    Member

    Hey Carlos. That’s odd; have you resaved permalinks after updating? How are these events being fed into your home page – a widget, or via template tags? A link to the site (so we could try to figure out what’s up) would be helpful.

    #17996
    Carlos
    Participant

    Hey Rob…not sure if it was just me but I could have sworn that ECP posts were being added to my blog feed previously (again it could just be me). Resaved permalinks, but no go. Found this nice piece of code to manually add custom post types to the blog feed. Works great so I’m happy.

    function my_get_posts( $query ) {
    if ( ( is_home() && $query->is_main_query() ) || is_feed() )
    $query->set( ‘post_type’, array( ‘post’, ‘tribe_events’ ) );
    return $query;
    }
    add_filter( ‘pre_get_posts’, ‘my_get_posts’ );

    PS here’s the site if you want to take a look. A tad more cleanup to do and it shoudl be good to launch next week. http://sustainableelements.ca/

    #18024
    Carlos
    Participant

    Scratch that. Went to do a demo fo the site, and it turns out the code above completely trashed the event calendar page replacing it with the home page. I have a feeling it may be because I did not properly define the ECP post type. Any suggestions how to get new events to show up on the home page feed? http://sustainableelements.ca/
    Thanks a bunch guys!

    #18167
    Jonah
    Participant

    Hey Carlos,

    Make sure you’re using proper single quotes in the function above. When I pasted the above into my code editor, I needed to correct the single quotes and then it worked.

    I hope that helps!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘ECP posts missing from blog front page’ is closed to new replies.