Posted: November 28, 2016 at 5:12 am
|
Hello all, We are using WordPress 4.6.1 with EventEspresso 4.9.16.p I am looking for a way to utilize a page-specific ID for our event list page. Is there a way to inject one, or is there one that already exists? I could not find one from inspecting the page source. So the background for this scenario is, currently we are using this parent category as our main Event list page. We had to use a category page like that because there are certain private events that we do not want listed on the website. I need to remove the post metadata (labeled with the classes Regardless, however, the issue I’m running into is that the blog archive page uses the exact same labeling scheme, and there the post meta data actually serves a useful function. I need to be able to remove that <div> from just our main event-category page, or from all EE post archive pages. If you could advise me on the simplest way to accomplish this, I would be so grateful. Thank you! |
|
Ahh wow, I am kicking myself right now. I was actually looking at the wrong page source. The blog page uses a <div> while the EE archive page uses a <span>. So that is that. Sorry about that! But if there is a way to do a page-specific ID, I would still like to know as I have some other stuff in mind that may require it. Thank you |
|
Gosh I feel like such a dunce today. I must be sleeping still because my eyes are not working. The blog page does of course actually use the <span> as well, so my issue is still an issue. |
Hi there,
EE is not setup to display that information, your theme is. Your using the standard WP category listings which uses your theme to output the details, if your theme outputs the post_date for the posts list then that’s what is output to the page. EE injects the event details into the_content and uses your theme to output the details as much as possible, we do this to keep event posts consistent with your other posts.
Can you not just use the classes added to the body tag? If I understand correctly, you don’t need an ID to do what you need. For example, to remove that element from EE category listings: .tax-espresso_event_categories span.post-meta.meta-data { display: none; } To remove it from the EE archive page: .post-type-archive-espresso_events span.post-meta.meta-data { display: none; } Combine that together: .tax-espresso_event_categories span.post-meta.meta-data, .post-type-archive-espresso_events span.post-meta.meta-data { display: none; } That should remove that section. The body tag (if using body_class()) adds page specific classes that you can use for a whole host of context specific selectors. Is that what you are looking for? |
|
|
Oh super, I don’t know how I missed that EE class in the <body> tag. … Thanks Tony. Sorry for the time wastage. |
The support post ‘Injecting page-specific ID to an Event List page’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.