Show Custom Page Title for Same LoopBuddy Layout on Different Pages via Shortcode

From iThemes Codex
Jump to: navigation, search

One awesome example of using Shortcodes with LoopBuddy is to show a custom page title, along with any LoopBuddy Layout content, where different pages use the same LoopBuddy Layout. Our awesome LoopBuddy customer Bruce provided the following info to help you all with that:

  • 1 : Put the following anywhere (usually near the end of the file) in your theme's custom functions.php file:
function return_title() {
return '<h1>'.get_the_title().'</h1>';
add_shortcode('pg_title', 'return_title');
  • 2 : Add [pg_title] anywhere in the LoopBuddy Layout where you want to show the custom page title.

That will show the custom page title just for that specific post/page where the Layout is being shown.

Related links: LoopBuddy user Bruce asking about and then sharing the code to show custom Page Titles on each Page where the same LoopBuddy Layout is used

← Back to LoopBuddy Codex Home