Skip to content

Instantly share code, notes, and snippets.

@neilgee
Last active November 27, 2017 02:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neilgee/5d6cedbb4ed9b10fd15e39d313e1ef21 to your computer and use it in GitHub Desktop.
Save neilgee/5d6cedbb4ed9b10fd15e39d313e1ef21 to your computer and use it in GitHub Desktop.
Genesis Title Toggle on Learn Dash Custom Post Types
<?php
/**
* Add Genesis Title Toggle to Custom Post Types using Learn Dash as an example
*
* @link http://www.billerickson.net/code/genesis-title-toggle-for-posts
* @link https://wpbeaches.com/genesis-title-toggle-custom-post-types-learn-dash/
* @author Bill Erickson
* @author neilgee
*
* @param array $post_types
* @return array
*/
function themeprefix_title_toggle_on_cpts( $post_types ) {
$post_types[] = array('posts','sfwd-courses','sfwd-lessons','sfwd-quiz','sfwd-certificates'); //add your CPTs
return $post_types;
}
add_filter( 'be_title_toggle_post_types', 'themeprefix_title_toggle_on_cpts' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment