Tagged: x
-
AuthorPosts
-
March 11, 2017 at 8:40 am #1403066
Hi Guys,
I’m using Event Espresso on a site and I’d like to use the Cornerstone Editor to style the venue pages. However it’s not showing as an option in Cornerstone Settings. It’s not a deal-breaker, but it would be great to continue the style of the site through all the pages if possible.
Any idea if Cornerstone can be tweaked to allow this?
Many thanks, URL in private message next…
SW
March 11, 2017 at 8:40 am #1403067This reply has been marked as private.March 11, 2017 at 6:44 pm #1403374Hi there,
Thanks for writing in.
You can add this code to your child theme’s functions.php to allow specific post type for cornerstone.
add_filter( 'cornerstone_allowed_post_types', 'espresso_post_types' ); function espresso_post_types ( $allowed_types ) { $allowed_types[] = 'venue'; return $allowed_types; }
Replace venue with whatever post type your Espresso venue uses 🙂
Hope this helps.
March 12, 2017 at 5:43 am #1403691Thanks Rad,
The post type is espresso_venues and I’ve added the code to functions.php.
The Cornerstone tab is showing on the page editor but it doesn’t function. It’s not being offered as an option in the Cornerstone/Settings page either.
Am I missing something obvious here?
Steve
March 12, 2017 at 5:52 am #1403697Bizarre,
I’ve just retried adding a new venue and it works now. Albeit with some added padding etc… I can sort that I think.
I’ve got a feeling this will be a struggle…
Onwards and upwards!
Thanks again!
March 12, 2017 at 6:41 am #1403739If I was to add espresso_events to allowed_types using your code above do I just use the , as a separator?
e.g. $allowed_types[] = ‘espresso_venues’ , ‘espresso_events’;
Thanks in advance…!
🙂
S
March 12, 2017 at 10:15 am #1403839Hey there,
You can try like this :
add_filter( 'cornerstone_allowed_post_types', 'espresso_post_types' ); function espresso_post_types ( $allowed_types ) { $allowed_types = array('espresso_venues', 'espresso_events'); return $allowed_types; }
Let us know how it goes.
March 21, 2017 at 7:08 am #1414819Hi Rupok,
I added that code and it has now stopped me from editing normal pages using Cornerstone, I just get the CS code in the editor and no Cornerstone option in the tabs?
Any ideas?
Best wishes,
S
March 22, 2017 at 1:21 am #1415855Hi Steve,
Kindly change the code to this.
add_filter( 'cornerstone_allowed_post_types', 'espresso_post_types' ); function espresso_post_types ( $allowed_types ) { array_push($allowed_types,"espresso_venues", "espresso_events"); return $allowed_types; }
Hope that helps.
-
AuthorPosts