Jump to content
Audun MB

Styling custom post type from Events Manager?

Recommended Posts

Audun MB

I'm using Events Manager for events, and it works OK. There is just one issue, which is that I don't want to show post date on the Event page.


http://www.attac.no/events/skatteparadisfri-sone-oslo/ (in Norwegian)

The event is on the 17th of October, but was posted the 9th of October. This causes some confusion to readers when both dates are visible.

I want to keep post dates on regular posts, but hide them on Events.

Event Manager shows Events as custom post types, and it seems like I'm able to use Pagelines drag-and-drop on the Events.php template.

So I figure that what I ought to do is editing the meta-information for events.php? Or use CSS to hide the post-date on events?

Any tips on how to do that?

Share this post

Link to post
Share on other sites

If you apply display:none; to the element you want to hide, it won't show.

Former PageLines Moderator, Food Expert and Raconteur

Share this post

Link to post
Share on other sites
Audun MB

What I need help with is how to do that only on Event-pages? How do I separate CSS for the event-pages from that on regular posts?

Share this post

Link to post
Share on other sites

Time for some WordPress 101 for search purposes then.

Three years ago WordPress added automatic body classes depending on what page you are viewing using the body_class() function.

This means themes/developers can easily target specific pages, for example every post will have a postid-nnn class added.

So lets look at the body tag of your events page:

<body class="single single-event postid-3088 custom responsive pagelines-template-theme event full_width ">[/CODE]

As we can clearly see the events plugin is inserting two clases for you [b]single-event [/b]as its a single even page and [b]event[/b], Im guessing every event page would have this.

So to style something on that page, just start your css with [b].single-event[/b]


Share this post

Link to post
Share on other sites

The topic was marked as resolved.

Former PageLines Moderator, Food Expert and Raconteur

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • art23130
      By art23130+
      I have uploaded a file shoing missing sections for Custom Post Type
      It is OK for categories and tags but not for a single post types. 
      This is the link. 
      Any idea?
    • jagipson
      By jagipson+
      Having a problem with an EVENT Post from Caledarize It. The Calendar page looks fine but when you go into the event itself the layout gets all messed.
      The Event calendar works fine and when you click on an event the page only works if you select only for "This event". The page needs to be for All events so they all look the same.
      Looks like conflicting code maybe?
      Events Calendar Page: https://tri-state-new-jeffgipson.c9users.io/events-calendar 
      Events Single Page: https://tri-state-new-jeffgipson.c9users.io/events/new-test-event-20/
      @Danny @Simon

    • PeriniNero
      By PeriniNero+
      We are building a Custom Post Type with Custom Fields and Custom Taxonomies.
      The only thing we dont understand is how to embed the Custom Fields including header tags and stuff in the Postloop (now we use a text-box below the postloop section but also SEO wise this is not best pratice).
      So we thought to copy the dms Postloop section to our child theme and rename this, to add an extra Postloop section to our theme. Is this the way?
      What exactly to adjust in those 3 files class.posts.php, section.php and style.less (at this point we know how to change the thumb LOL) and where to add the Custom Fields shortcodes?
    • Audun MB
      By Audun MB+
      I'm using plugins such as Events Manager and WP Glossary. Basically I need to edit the meta information and the breadcrumb for the custom post types Event and Term. The plugins instruct me to add a single-event.php and single-glossary.php in my (child) theme.
      What should I use as a basis for these files? Can I use the templates in the Framework main theme as a basis (tpl-a.php)? Or should I use the whole page.php file?
    • ketri
      By ketri

      When I select a page template for a custom post type page, it also selects the same template for the children of this custom post type. 
      I want to have my custom post type template as a heavily customized loop that I've developed myself, and the children (they are articles) as a completely another template.
      Is there a function that would allow me to select different templates for them on DMS?

      Thank you very much in advance.