TTF Titles
Using in Pages and Posts (3 posts)

  1. ttiefenbach
    Posted 5 years ago #

    Is there a way to utilize this function in my pages and posts? I don't want to enable PHP execution on all pages, but more create a way to use something like [the_ttftext('text')]

    Any support?

  2. ttiefenbach
    Posted 5 years ago #

    Here's what I did, hope this helps someone:

    Added the following code to the ttftitles.php file:

    function the_ttftext_shortcode( $atts ) {
       extract( shortcode_atts( array(
          'text' => '',
          'echo' => true,
          'style' => '',
          'overrides' => '',
          ), $atts ) );
       the_ttftext (esc_attr($text), esc_attr($echo), esc_attr($style), esc_attr($overrides));

    Then added the following code to my Theme Functions file:
    add_shortcode('ttf_text', 'the_ttftext_shortcode');

    In my pages and posts I can use the function like this:
    [ttf_text text="Hello World!" echo="true" style="basic" overrides=""]

    Of course you don't have to use all the options, I usually only need to use the "text" parameter.

    I hope this becomes part of the next version, it's SUPER useful!!!

  3. ttiefenbach
    Posted 5 years ago #

    OK, I thought my shortcode would work, but it's not 100% accurate. :( Can we add this functionality to the plug-in?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • TTF Titles
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic