Forums

Hook for "before content" on only main page, not posts?? (3 posts)

  1. rvelting
    Member
    Posted 1 year ago #

    Tried searching, and not exactly sure what i'm searching for..

    Trying to include text before content, but not when a post is displayed.

    Adding text to "Before Content" box in OpenHook works, but displays on individual posts as well which i'm trying to avoid.

    I'm sure this is very simple, but I don't know how to do it.

    Thank you very much for the help.

    Ryan

  2. rvelting
    Member
    Posted 1 year ago #

    Maybe it will help to show what i'm trying to explain.

    http://www.ruggedmoose.com

    Before the content it says "On the Rugged Moose Blog"

    I'd like that to say that there on the main page, but NOT on subsequent page, such as individual posts or other pages such as the Contact Page here: http://www.ruggedmoose.com/contact-us/
    or on Posts like here: http://www.ruggedmoose.com/grdrunkdriving-com/

    Again, any help is very much appreciated.

    Ryan

  3. rvelting
    Member
    Posted 1 year ago #

    Nevermind... thanks for all the help..

    just added the following to my custom_functions.php file...

    function custom_text() {
    if (is_front_page()) {
    ?>
    <style type="text/css">
    <!--
    .style2 {
    font-size: 20px;
    color: #CCCCCC;
    }
    -->
    </style>
    </head>

    <body>
    <p><span class="style2">On the Rugged Moose Blog</span>
    </p>

    </body>
    <?php
    }
    }

    add_action('thesis_hook_before_headline','custom_text');

Topic Closed

This topic has been closed to new replies.

About this Topic