Support

Home Forums Event Espresso Premium WordPress SEO by Yoast Metabox not appearing in Event Post Type edit Screen

WordPress SEO by Yoast Metabox not appearing in Event Post Type edit Screen

Posted: April 28, 2015 at 10:20 pm

Viewing 4 reply threads


Jon Ang

April 28, 2015 at 10:20 pm

Hello,

Using both EE4 and WP SEO latest on WordPress 4.2.1 with Canvas (and child theme)

The WordPress SEO by Yoast meta box is not present neither in the edit screen nor as a checkbox in Screen Options.

Did the standard – disable all plugins and use default theme (I used 2015). The box is still not there.

The box is however present in posts and pages.

I assume the recent add_query_args change broke the path?

Cheers!


Josh

  • Support Staff

April 29, 2015 at 6:34 am

Hi Jon,

It turns out that the WordPress SEO by Yoast metabox will not automatically load in Event Espresso’s event post type edit screens because the SEO plugin does this check:

if ( in_array( $pagenow, array( 'edit.php', 'post.php', 'post-new.php' ) ) || apply_filters( 'wpseo_always_register_metaboxes_on_admin', false ) ) {
$GLOBALS['wpseo_metabox'] = new WPSEO_Metabox;
if ( $options['opengraph'] === true ) {
$GLOBALS['wpseo_social'] = new WPSEO_Social_Admin;
}
}

The nice thing is, they provide the filter in that conditional so you can override it by adding something like this to a little function plugin:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/third-party-integration/tw_ee_load_yoast_seo_within_ee.php

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.

  • This reply was modified 6 years, 9 months ago by Josh. Reason: updated snippet


Jon Ang

May 2, 2015 at 7:54 am

Hey Josh,

I looked a little into it after your insight – but I was thinking checking for admin.php only was a little inspecific so I decided to check for page = event_espresso.

Then I also did a search on the forums and realised that there were some questions too.

I think I discussed this with Darren over github that a plugin or a core file to hook popular plugins properly would be good.

I guess you guys are fixing the major stuff first so I wrote something –

https://wordpress.org/plugins/event-espresso-smooth-integration/

Hope it helps someone!


Dean

May 4, 2015 at 6:20 am

Thanks Jon! That’s awesome. I’ll make sure Darren sees this.


Jon Ang

May 4, 2015 at 10:30 am

Yes that’s awesome. It would be great to have his input. I’d be happy to integrate other plugins as well.

Cheers! Marking as resolved

Viewing 4 reply threads

The support post ‘WordPress SEO by Yoast Metabox not appearing in Event Post Type edit Screen’ 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.

Event Espresso