MEC Events search visibility and template

Hi @christian,

As discussed…

My MEC events aren’t picked up by search (MEC or nav) and on previewing events directly in MEC, they appear to use a blog template rather than the MEC standard?

I know the Portfolio slug in themes defaults to the same as MEC but I have changed in both MEC and Cornerstone - they are different. I am using Postname for the WP Permalink structure.

This worked previously…can you help please?

Hello @AMAC,

Thanks for writing in!

The Blog post template is the default template for the custom post type. Go to MEC > Settings > Single Event > Single Event Style and select “Modern”;

This should use the MEC template.

Best Regards.

Thanks @ruenel,

This didn’t work and shows the blog template as before. Also, events still dont show in search.

I had this working in a previous install with the default template so I don’t know what changed. After using WP-Reset as advised, it stopped working…

Can you help please?

Hello @AMAC,

As it turns out, I found out that in Appearance > Widgets, you inserted the Search, Recent Posts and Recent Comments widgets for the MEC Sidebar:

If you removed widgets, the default MEC widgets should display.

Kindly let us know how it goes.

Thanks @ruenel, great, displaying properly. Two issues:

  1. events are not displaying in search
  2. How do I change the breadcrumb navigation to match my MEC events slug and not just “Events”?

Can you help please?

Hey @AMAC,

1.) In your Search plugin settings, you need to include the Events custom post type.

2.) It seems that you already figured it out:

Best Regards.

Hi @ruenel,

Thanks, please see below:

  1. The search issue is with MEC search and the Church theme navigation search - still an issue with events not appearing in their search results.
  • I installed and configured Ivory search to help with troubleshooting and it works - this doesn’t solve my issue though.

  • I also changed the MEC search to Ajax search and it worked. I thought this suggested a caching issue so I purged my CDN cache - didn’t help. I don’t have any wordpress caching plugins at the moment.

  1. I changed the blog title in church theme options to “Event Details” but my question was how to change that title to the MEC event title?
  • Custom page template or edit the PHP?

Can you help please?

Hey @AMAC,

1.) In your Ivory Search plugin setting, you have excluded the Events. This is why the events are not displayed in search. Disabling this made the search function work with events again.

Test is here: https://your-domain.co.uk/?s=Ltamxcqsu

2.) You will have to follow this old thread to create a custom title for the Events:

In the line 44-52:

            <?php if ( x_is_portfolio_item() ) : ?>

              <h1 class="h-landmark"><span><?php echo x_get_parent_portfolio_title(); ?></span></h1>

            <?php else : ?>

              <h1 class="h-landmark"><span><?php echo x_get_option( 'x_renew_blog_title' ); ?></span></h1>

            <?php endif; ?>

You will have to add another condition that when it is a single event page, it will display “Event Details”. For example;

<?php if ( x_is_portfolio_item() ) : 
    // Portfolio item
    ?>
    <h1 class="h-landmark"><span><?php echo x_get_parent_portfolio_title(); ?></span></h1>

<?php elseif ( is_single() && get_post_type() == 'event' ) : 
    // Single event post type
    ?>
    <h1 class="h-landmark"><span>Event Details</span></h1>

<?php else : 
    // Default blog title
    ?>
    <h1 class="h-landmark"><span><?php echo x_get_option( 'x_renew_blog_title' ); ?></span></h1>

<?php endif; ?>

Kindly let us know how it goes.

Hi @ruenel,

That’s frustrating, thanks for picking up the ivory search settings, I was sure they were updated. Search now working, many thanks!

I’ll look into the custom title further thanks but meanwhile, would it be something similar for the breadcrumbs ?

How do I change the breadcrumb navigation to match my MEC events slug and not just “Events”?

Thanks again

Hey @AMAC,

Simply go to M.E. Calendar > Settings and set your Archive page title to have “What’s On” in your breadcrumb.

image

Hope this helps.

Hey @ruenel,

That’s great thanks, it worked and I missed that!

The Ajax mec search bar live results are appearing under other elements and text on the page when they drop down. I have tried addressing with CSS and changing Z position values but no joy. It’s on my homepage.

Can you help please?

Hello @AMAC,

I would suggest you go to the Sections where the search has been added, go to Customize ->Element CSS->Add this custom CSS code.

$el.x-section{z-index:9999;}

The purpose of providing custom CSS is to show you how to add CSS code to your site. Writing custom CSS is outside the scope of our theme support. If you need more customization, you need to learn CSS and learn how to use the browser’s element inspector.In case if you have no idea about coding, you can subscribe to One, where customization questions are answered.

Hope it helps.
Thanks

Thanks and that worked but the main menu drop-down went under the section so I changed the value to 9998 and added this code to global CSS:

.x-navbar {
position: relative;
z-index: 9999;
}

Am I okay to ask a few more design questions on this thread or should I create a new one,?

Thanks

Hello @AMAC,

I suggest creating a separate new thread if you have any additional concerns about our theme and Cornerstone page builder settings.

Thanks