Last active
November 27, 2017 02:55
-
-
Save neilgee/5d6cedbb4ed9b10fd15e39d313e1ef21 to your computer and use it in GitHub Desktop.
Genesis Title Toggle on Learn Dash Custom Post Types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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