Posted: May 18, 2019 at 6:36 am
|
I’m trying to get the Yoast SEO options on event pages. I’ve followed the example here: When the admin page opens I get the following error (and no Yoast): <b>Notice</b>: Undefined index: post_ID in <b>/nas/content/live/rustudios/wp-content/plugins/wordpress-seo-premium/premium/classes/premium-metabox.php</b> on line <b>192</b> Any ideas? Thanks! |
Hi there, I’ve not tested the above snippet with Yoast’s premium version as I don’t use it. If you’d like to send me a copy of the plugin I’ll take a quick look and see if it is something I can fix with the snippet, I’m guessing it’s pulling the current post_ID expected the default WordPress route. You’ll need to host the .zip somewhere and post a link I can use to download it here. (You can set the post to private if preferred) |
|
|
This reply has been marked as private. |
Yeah, in that case, it’s not the code, but placing that snippet in https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/ |
|
|
I’ve followed those steps (taken the code out of functions.php and put into a customs function plug-in, and activated it) but I’m still getting the original error. |
Which error? Yoast isn’t loading on the event editor or you’re still getting the notice? |
|
|
Yoast is now loading, but I’m still getting the Yoast error. I guess it is their problem rather than yours though! I’ve emailed them – thank for the the help. |
Yeah, it’s from a function within Yoast, this one to be exact:
So they always expect You can add something like:
To the above snippet (outside of the first function) and that should stop it. |
|
|
That worked perfectly – thank you! |
The support post ‘Yoast SEO on event pages’ 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.