Posted: February 16, 2015 at 11:22 am
|
Hi, This is my first spin with EE4 having previously set up to use EE3. Due to time constraints, I’m not trying anything other than to style a standard installation. The issue is where the event has links back to the application (for example in the event booking confirmation) they are using the theme’s default blog post template. I appreciate this is standard behaviour, but is there any easy way round it? Here is the link to show the event appearing in the blog template: goo.gl/yn7uOL I hope that make sense to someone… Her’s the registration link: goo.gl/ST7Xzc Thanks so much. Chris WP 4.1 |
Hi Christopher, Event Espresso 4 uses the WordPress theme’s archive.php template to display the list of event posts. There are a few ways around this, and the simplest option involves modifying the theme’s archive.php template and find the parts of it that mention a blog. Then you wrap those in a conditional like this:
|
|
|
Thanks Josh, My theme is using single.php in this case. At least this is where I’m seeing the issue. If I do something like this though for the title for example:
And if I leave the h2 class statement in tact:
…it just outputs the title twice. Do I need to create an if/else statement to make it work. Hope that makes sense. Chris |
Hi Christopher, if you are running short on time then another option would be to use CSS to hide the postmeta information and other elements on the page: https://eventespresso.com/wiki/hide-certain-elements-event-espresso-pages-using-css/ — |
|
|
Hi Lorenzo! Yes I’ve already nuked the links with a bit of CSS. My issue is the page titles, that have to have a different title other than ‘blog’. Maybe they can be manipulated with some conditional CSS? Chris |
Alright, I see the issue that you are running into. Is there a way to enable body classes for your theme? That would allow removal of certain elements by using something like this: .single-espresso_events h2.blog-title{display:none;} Another option is to use a conditional (https://eventespresso.com/wiki/ee4-conditional-tags/) to load CSS on the single event pages like this: function ee_hide_select_elements() { if(is_espresso_event()) { ?> |
|
|
Thanks Lorenzo! Sorry for the delay – the only way I could get this to work whilst adding the code to the single.php is as follows:
This hides the necessary elements – but ideally I’d just want to change the header text. Which I still can’t do. Is there any way to combine any of the suggested fixes? Chris |
|
Hi, Can you provide a link to an example post/event please? The links above go to a 404 page. |
|
Hi! Here is the link to the event registration page. This is the link that clients click from the email: You see the header block is now missing. That’s because I’ve hidden it with the code above, but ideally it would be better with it in situ. Hope that makes sense!? Chris |
|
Sorry made a mess of that: http://www.esconsulting.com.sa/event-list/ And http://www.esconsulting.com.sa/events/test-event-please-do-not-book/ |
Hi Chris, Both those links show 404 for me – http://take.ms/PPTPZ Can you try flushing your permalinks. Go to Settings -> Permalinks. Make no changes and click ‘Save Changes’ |
|
|
Hi Could you try now… Chris |
Same for all of the links provided. Which permalink structure are you using? Are you running any caching plugins? Are you logged into the site currently? If you view those pages when logged out do you still see them? (You can use a Chrome Incognito window or FireFoz Private Session for example) |
|
|
Right sorry about that interlude, not only was I having server issues but the events were also set to private: http://www.esconsulting.com.sa/event-list/ http://www.esconsulting.com.sa/?espresso_events=test-event-please-do-not-book Code I was using as above… |
Hi, I don’t think its possible to dynamically set the event title there. However, an str replace could change the text from blog to something like event registration or some other static text. Let us know if that would work for your needs. — |
|
|
Thanks Lorenzo – I just created a child theme and implemented it in correct way in the end! Thanks for your help… Chris |
|
Glad you got it sorted Chris. |
The support post ‘EE4 Links Using Blog Archive’ 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.