Archived

This topic is now archived and is closed to further replies.

  • 0

Resolved Styling custom post type from Events Manager?


Question

Posted · Report post

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.

Example:

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

5 answers to this question

Posted · Report post

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

Posted · Report post

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]

/lesson

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks Simon.

Share this post


Link to post
Share on other sites

Posted · Report post

The topic was marked as resolved.

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites