5ThirtyOne

Derek Punsalan

Media Temple

Mint hidden title modifier [Wordpress]

Trimmed titles in Mint

Credit to Paul for pointing me in the right direction for cleaning up the titles reflected in my Mint install. Prior to the title modifier, Wordpress’s methodology for displaying the sites title in front of individual post titles was pushing content from view in Mint. Check the screenshot for a visual. Notice the cluttered titles on the left? It’s a lot easier to understand what’s being tracked when titles are readable.

Wordpress users running Mint as their statistical tracking can achieve the same results using the following:

<?php if (is_home()) { ?>
<script type="text/javascript">
// <![CDATA[
var Mint_SI_DocumentTitle = "5ThirtyOne | It's not wheatgrass";
// ]]>
</script>
<?php } else {
$tmpMintTitle = wp_title(â??, false);
$tmpMintTitle = substr($tmpMintTitle, 2, strlen($tmpMintTitle));
?>
<script type="text/javascript">
// <![CDATA[
var Mint_SI_DocumentTitle = "<?php echo $tmpMintTitle ?>";
// ]]>
</script>
<?php } ?>
<script src="/mint/?js" type="text/javascript">
</script>

Note that you must change 5ThirtyOne | It’s not wheatgrass to reflect your own page title. Shaun Inman’s original Mint: Overriding Page Titles covers the official title modifier.

Backblaze unlimited secure online backups Find out what Backblaze can do for your online backups

One Comment • RSS

  1. Abe Lincoln says:

    I just wanted to say thanks. This solved my only problem(so far) with Mint.
    Love the site btw.

Leave a Reply

Comments may be held for moderation. If your comment does not appear immediately, do not repost. I reserve the right to remove any inappropriate or off-topic comments. If you plan on sharing helpful code, please pass it through Postable first. Want other to know who you are? Register a Gravatar.

Syndicate

Subscribe via RSS or Email

Advertisements

9rules network

Categories

5THIRTYONE

Public projects

Select project

Something new

Fresh content

Show Latest

iPad GUI PSD The PSD was constructed using vectors, so it’s fully editable and scalable. You’ll notice there are a few new UI elements as compared to the iPhone interface. The workable screen design is ... Link