Viewing 9 replies - 1 through 9 (of 9 total)
  • try Events > Settings > Pages > Event Page > Display events as =Posts

    Thread Starter Sherifftim

    (@sherifftim)

    Yeah, already set it to posts but none of my events are showing up in the blog. :o/

    can I know what do you mean by “blog” ?

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    do you mean you want the events to show up on your home page with your other blog posts? If so, maybe this’ll help:

    https://justintadlock.com/archives/2010/02/02/showing-custom-post-types-on-your-home-blog-page

    our post types are event and location, or the EM_POST_TYPE_EVENT or EM_POST_TYPE_LOCATION php constants

    Thread Starter Sherifftim

    (@sherifftim)

    Thanks Marcus but I think I’m missing something. In functions.php (in my theme folder) I added:

    ##############################################################
    # Include events in blog roll
    ##############################################################
    
    add_filter( 'pre_get_posts', 'my_get_posts' );
    
    function my_get_posts( $query ) {
    
    	if ( is_home() && $query->is_main_query() )
    		$query->set( 'post_type', array( 'post', 'page', 'album', 'movie', 'quote', 'event' ) );
    
    	return $query;
    }

    I also tried it with EM_POST_TYPE_EVENT in place of just ‘event’ but no dice. What am I missing?

    Thanks again for your help.

    Thread Starter Sherifftim

    (@sherifftim)

    Oops, whole code isn’t showing up there. in the array I included ‘event’ in with ‘post’, ‘page, ‘album’

    Plugin Support angelo_nwl

    (@angelo_nwl)

    have you tried removing if ( is_home() && $query->is_main_query() ) ? also, can I know where do you want it to show?

    thanks

    Thread Starter Sherifftim

    (@sherifftim)

    Thanks Angelo, that kind of worked.

    Once I removed that line, everything showed up in my home page blog roll including my pages. Also, my pages were scrolling in my home page slideshow instead of the image slides I had originally.

    I switched back to my original backup functions.php and everything is back to normal except my test event page and test blog entry are gone. No big loss.

    My site is https://www.thebrixtonaustin.com If I want my events to show up on my home page with blog entries and also show up in my blog, how do you recommend I tweak the added code so I don’t mess up my slide show?

    Thank you again for all of your help guys. I am a total newb at this.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    how do you recommend I tweak the added code so I don’t mess up my slide show?

    -sorry can’t comment on this since I haven’t tried it yet; e.g. what slideshow or plugin is this?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Have events show up as blog posts?’ is closed to new replies.