Viewing 15 replies - 1 through 15 (of 40 total)
  • you could try telling EM to display events as posts in the settings pages tab

    Thread Starter lmsalgado

    (@lmsalgado)

    Thank you for your answer! But I did that, and altough the event behaves as a post, it does not show neither in the main page next to the regular posts, or the Posts section in the administration panel.

    Just to make it clear: I can see the event in the Events page, and in the Events section of the AP. I just wish to see it also as a regular post.

    Thank you

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    you’re confusing the purpose of this setting. It behaves like a post/page when showing the event, but this won’t make the event an actual page or post, so it won’t show in your page/post lists

    Thread Starter lmsalgado

    (@lmsalgado)

    🙂
    Yes, I know!
    But for my use I really needed it to show the events ALSO as actual posts…

    Any tip on how to do this?

    Thanks

    You could try using a custom query on your front page, adding the Events custom post type in; there may be a plugin to manage this without getting into the code. I’m not sure how dates would be handled, though – I imagine they’d either show up right when you post them or on the day of the event. If you wanted to set a different date for it to appear, that might be tricky.

    I was hoping to get my events to automatically go in my main blog area too, but I think I’m just going to manually copy the content of each new event listing into a new blog post (or find a way to use the shortcodes), since it’s not much work.

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    You can hook into the WP_Query object and hooks and just add in the event post type ad Colin says.

    EM does one thing when a post is loaded into the loop, which is it changes the default published date to the start date of the event (does not change it in the actual $post object though).

    Hi there,

    I would find this modification useful too (to make events actual posts/pages and display them in those sections in the admin panel). I am slightly uncertain of the procedure though and any further details you could provide (if not too complicated) would be appreciated.

    I have accessed wp-includes/query.php but am not sure where to go from here.

    Thanks for creating such a great plugin.

    Thread Starter lmsalgado

    (@lmsalgado)

    Thank you all for your tips.
    I just realized that the events are in a different table than real posts. I thought that by choosing the option to publish as post, the event would be a post, but no, its just a look alike. This may mean that the flexibility I wish is way to hard to achieve.
    It’s a pitty since I really liked this plugin, but i think I’ll look for another ones that may help my goal.

    Thank you all, I’ll keep my attention on this forum, maybe someone has some ssecret recipe 😀

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    @robinmchugh in the admin area, that’ll never happen (you could do it, but you’re asking for trouble), just not the way it works.

    Events are custom post types, they use the same posts table, but we also have an index table for searching events etc rather than using the WP_Query object

    Thanks for your response. I was slightly misleading by stating I wanted to see the events in the posts admin area. My main aim was to make my theme recognise the events as posts so they are displayed in the frontend in the theme’s featured areas. Ie. To assign the EM events as a blog category which could be selected as a featured category in the theme options (or something to that effect).

    Would adding the event post type into the WP_Query help achieve this in any way?

    As far as I can see, an EM page will override a standard blog post with the same permalink, so a workaround (as I think Colin suggests) is to create “partner posts” for each event. I’m not working with too many events, so I may settle for that.

    Thanks.

    @robinmchugh

    You can try this snippet, this will allow your theme to display events/cpt on your front-page by pasting it to your theme function (e.g. functions.php)

    add_filter( 'pre_get_posts', 'my_get_posts' );
    function my_get_posts( $query ) {
    	if ( is_home() && false == $query->query_vars['suppress_filters'] )
    		$query->set( 'post_type', array( 'post', 'event' ) );
    	return $query;
    }

    Also, you can temporarily revert to TwentyEleven theme to see how it works.

    hi agelonwl, thanks for your suggestion.

    In TwentyEleven, the snippet does indeed cause the theme to display the events on the homepage but alas, not in my chosen theme (Organic Structure).

    This is probably due to the fact that the theme’s options require a blog category to be specified for the three different featured content sections of the homepage (although ‘all categories’ still won’t include events). Same with it’s blog and portfolio page templates. So seems like it will require modification of the options file.

    I have approached Organic Themes for some further help with this.

    Thanks again.

    dwood7399

    (@dwood7399)

    @adelonwl

    I am also looking to show event posts in both the Event’s page as well as the main Loop on my home page. I’ve added your function to my functions.php file, but the event’s aren’t showing in my main loop, even in TwentyEleven theme.

    Is there another adjustment I need to make to the loop itself?

    Thanks!

    @dwood7399

    can you provide a sample link ? also, when using TwentyEleven theme did you set it to read your latest post at wp general > reading and your events as post.

    has there been any development on this . I really need to assign a post category to my events so I can display them in my theme also

    Thanks
    Alan

Viewing 15 replies - 1 through 15 (of 40 total)
  • The topic ‘[Plugin: Events Manager] Show events as regular posts (articles)’ is closed to new replies.