Support

Home Forums Event Espresso Premium Update Page Header

Update Page Header

Posted: August 20, 2020 at 6:13 am


MRLane

August 20, 2020 at 6:13 am

Hello – I have set up an event using the slug “registration” as I already had an event page on my site. However, when I view the event page, the header says “Blog” – I would like to update that to “Registration”.

I created a new page called Registration, think that would address the issue.

Event page: https://www.healingwiththearts.com/registration/healing-with-the-arts-transpersonal-nursing-as-ontological-artist/

In addition, I would like to remove the “Comments” section at the bottom of the page.

Appreciate your help, thank you!


Tony

  • Support Staff

August 20, 2020 at 1:03 pm

Hi there,

However, when I view the event page, the header says “Blog” – I would like to update that to “Registration”.

That’s actually from your theme, Event Espresso events are custom post types and we basically just hook in and inject additional details into the_content. That means the output on your site is very much controlled by your theme, which theme are you using? There may be a hook you can use to change that heading.

I created a new page called Registration, think that would address the issue.

That page will never be displayed, the events slug (which you have set to ‘registration’) is a higher priority than a page slug. So WordPress will show the ‘registration’ archive rather than the ‘registration’ page.

In addition, I would like to remove the “Comments” section at the bottom of the page.

Just for EE events or site-wide?

The comments section is controlled by the ‘Discussion’ meta box within the event itself, or you can disable comments site wide to prevent them showing at all.


MRLane

August 21, 2020 at 6:48 am

Hi Tony – thanks for your response.

I am using Quode theme, so if you have any suggestions on how I might find the hook for the Blog page title, I’d appreciate it.

Thanks for the info the events slug.

I do not have the “Allow Comments” boxed checked on the event page and it is still showing up. I am happy to remove Comments site wide too, so would appreciate your guidance.

Many thanks!


Tony

  • Support Staff

August 21, 2020 at 7:11 am

I am using Quode theme, so if you have any suggestions on how I might find the hook for the Blog page title, I’d appreciate it.

Can you send me a copy of the theme so I can take a look?

I do not have the “Allow Comments” boxed checked on the event page and it is still showing up. I am happy to remove Comments site wide too, so would appreciate your guidance.

The easiest option is to use a plugin like this: https://wordpress.org/plugins/disable-comments/

Then just set that to disable comments everywhere.


MRLane

August 21, 2020 at 8:23 am

My bad… the theme name is Central by Quode.
I have a zip file. What is the best way to send it to you?
I’d rather not use another plugin, but I will consider it
BTW: I’m not getting your replies via email…
Many thanks!


Tony

  • Support Staff

August 21, 2020 at 8:58 am

You’ll need to host the .zip (you can add it to the site itself) and just post a link to download here, set the reply to private if preferred.

Or use something like WeTransfer and send it to support[at]eventespresso.com


MRLane

August 21, 2020 at 9:10 am

This reply has been marked as private.


Tony

  • Support Staff

August 24, 2020 at 8:50 am

Hmm, so, I find that themes template a little strange but I haven’t took a deep dive into the code to see why.

The single.php template will output ‘Blog’ for any post that doesn’t have a post meta value set with key qode_page-title-text.

There’s no hook etc in the theme to fix this although it is possible with a custom template and a child theme. If you aren’t using the child theme current, installa nd enable it (it allows you to have custom templates in the child that aren’t ove`rridden when you update the parent).

Copy the single.php template and put the copy in the root directory of the child theme.

Rename the copy to single-espresso_events.php

That template will not be used specifically for EE events.

On lines 60-64 you’ll have something like this:

<h1>
    <?php if(get_post_meta(get_the_ID(), "qode_page-title-text", true) != ""){ ?>
        <?php echo get_post_meta(get_the_ID(), "qode_page-title-text", true) ?>
    <?php } else { ?>
        <?php _e('BLOG','qode'); ?>
    <?php } ?>
</h1>

If you know you’ll never want to set specific titles per event then for the above change that to

<h1>Registration</h1>.

Then add this:

//* Allow the custom display order to work with the single-espresso_events.php theme template file
add_filter( 'FHEE__EED_Event_Single__template_include__allow_custom_selected_template', '__return_true' );

To your child themes functions.php file.

To explain the last bit, EE injects event details into the content automatically, unless, you use a single-espresso_events.php or archive-espresso_events.php template file as it assumes your are taking full control over the output, we aren’t here and just making a small change so the snippet tells EE to continue to inject the content even with your custom template.


MRLane

August 24, 2020 at 12:58 pm

Brilliant! It worked perfectly! I really appreciate your time on this! I am very grateful! 🙂


Tony

  • Support Staff

August 25, 2020 at 8:54 am

You’re most welcome.

You must be logged in to reply to this support post. Sign In or Register for an Account

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: publish

Updated by  Tony 1 month ago ago

Topic Tags

Tagged: 

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!