Home › Forums › Pro Support › Dsiplay secondary title This topic has 7 replies, 2 voices, and was last updated 4 years, 2 months ago by Tom. Viewing 8 posts - 1 through 8 (of 8 total) Author Posts September 19, 2019 at 6:39 am #11190 createurParticipant Hi there, we installed dispatch from gp site library and also use WP Show Posts Pro: https://gpsites.co/dispatch/ We also installed the Plugin Secondary Title: https://wordpress.org/plugins/secondary-title/ The Plugins outputs the new title via <?php echo get_secondary_title(); ?> How can we dispay the secondary title on a WP show post list? https://prnt.sc/p8945n Thank you. September 19, 2019 at 6:49 pm #11199 TomKeymaster Hi there, We can use a hook to add it to your lists. Where exactly do you want it to display? Let me know 🙂 September 20, 2019 at 2:38 am #11203 createurParticipant Hi, Thank you so much! Would be nice to display it below the main title. Best regards! September 20, 2019 at 8:17 pm #11225 TomKeymaster Try this: add_action( 'wpsp_after_title', function( $settings ) { if ( 123 === $settings['list_id'] && function_exists( 'get_secondary_title' ) ) { echo get_secondary_title(); } } ); Just change 123 to the ID of the list you’re targeting. September 21, 2019 at 4:45 am #11226 createurParticipant Thank you so much! Is it possible to add more list IDs and a CSS class to this snippet? September 23, 2019 at 4:05 pm #11247 TomKeymaster Definitely, try this: add_action( 'wpsp_after_title', function( $settings ) { $lists = array( '123', '456', '789', ); if ( in_array( $settings['list_id'], $lists ) && function_exists( 'get_secondary_title' ) ) { echo '<div class="your-class-here">' . get_secondary_title() . '</div>'; } } ); Then just add to the $lists array with the lists you want to target. September 24, 2019 at 9:05 am #11266 createurParticipant You are simply my favorite WordPress developer! I love your plugins and GP Theme! 👍 Thank you very much Tom! September 24, 2019 at 4:52 pm #11272 TomKeymaster Thank you! Glad I could help 🙂 Author Posts Viewing 8 posts - 1 through 8 (of 8 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In