Working With the TTFTitles Plugin

Posted: March 14th, 2009 | Filed Under: Tutorials, WordPress

Years ago, there was a great WordPress plugin, Image Headlines, that used True Type Fonts and image replacement to generate gorgeous titles on your blog using the fonts of your choosing. This ensured that your site’s viewers saw the fonts you wanted them to see. That plugin hasn’t kept pace with WordPress’s new releases. But TTFTitles has. It’s a great plugin, quite similar in operation to Image Headlines. The author is quite busy and has promised a “cookbook” of codes for quite some time but hasn’t gotten around to it. I’ve been playing around with this plugin while developing a site for a client. I thought I’d share with you the code that works for me.

SIDEBAR TITLES

<?php the_ttftext(My_Title, $echo=true, $style="YOURSTYLE"; $overrides=""); ?>

EXAMPLE:

<li id="archives">
<h3><?php the_ttftext("Archives", true, "sidebar", ""); ?></h3>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
</li>

ALTERNATE SIDEBAR TITLES (such as Pages, Categories, Bookmarks, etc.)

NOTE: you have to hard code the title the way you want using TTFText rules; then disable automatic title generation.

WP_LIST_PAGES

<li id="pages">
<h3><?php the_ttftext("Menu", true, "sidebar", ""); ?></h3>
<?php the_ttftext(wp_list_pages('title_li=')); ?>
</li>

WP_LIST_CATEGORIES

<li id="pages">
<h3><?php the_ttftext("Topics", true, "sidebar", ""); ?></h3>
<?php the_ttftext(wp_list_categories('title_li=')); ?>
</li>

BLOG NAME H1

<h1><a href="<?php echo get_settings('home'); ?>">
<?php the_ttftext(get_bloginfo('name')); ?></a>
</h1>

COMMENT TITLES “LEAVE A COMMENT”

<?php the_ttftext("YOURTEXT", true, "YOURSTYLE", ""); ?>

EXAMPLE:

<h2 id="comments">
<?php comments_number(__('No Comments'), __('1 Comment'), __('% Comments')); ?>
<?php if ( comments_open() ) : ?>
<a href="#postcomment" title=<?php the_ttftext("Leave a Comment", true, "wildride", ""); ?>">&raquo;</a>
<?php endif; ?>
</h2>

DATE

<p class="date">
<?php $month=the_time('M') ?>
<?php the_ttftext("$month",true,"date01",""); ?>
<span><?php the_time('d'); ?></span>
</p>

Leave a Reply