editing the MORE TAG with advertising code (help needed!)

Community Forums Forums Design Tips and Tricks editing the MORE TAG with advertising code (help needed!)

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Andrea Rennick 5 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #87669

    komanderkin
    Member
    Post count: 2

    hi everyone!

    on my old wordpress theme, i was able to insert advertising code after the <!–more–> tag.

    the idea is to have an advertisement in the post which displays exactly were the <!–more–> tag was inserted. i’ve tried getting this to work in Genesis, but i can’t figure it out.

    here’s the code which was added to functions.php on my old wordpress site:

    function adsense_added_at_more_tag($text) {
    if( is_single() ) :
    $ads_text = 'AD CODE GOES HERE';
    $pos1 = strpos($text, '<span id="more-');
    $pos2 = strpos($text, '</span>', $pos1);
    $text1 = substr($text, 0, $pos2);
    $text2 = substr($text, $pos2);
    $text = $text1 . $ads_text . $text2;
    endif;
    return $text;
    }

    any ideas how to get this to work in Genesis?

    #99202

    Andrea Rennick
    Keymaster
    Post count: 1236

    I can’t see anything in the code snippet that actually adds the function to the more tag itself.

    Perhaps that’s what you’re missing?


    **forum signature**
    If you need technical support for your theme please file a ticket.

    The forums are community based. Staff only monitors the forum for issues relating to the forum itself and to redirect users to where they need to go.

    Twitterholic

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.