• Resolved webmistress666

    (@webmistress666)


    So far, I’ve got everything working awesome. My only issue is that {TITLE} renders the A HREF tags on its own, meaning that I can’t control the link color by giving the HREF tag an inline style. This results in the post title always being the default blue, with an underline, which makes it nearly invisible on my design.

    Any way to hack this, to make my {TITLE} link white?

    Thanks!

    http://wordpress.org/plugins/subscribe2/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter webmistress666

    (@webmistress666)

    My cell:

    <td style="color:#fff!important;text-decoration:none!important;">{TITLE}</td>

    @webmistress666,

    {TITLE} only contains an anchor in the paid version, are you using Subscribe2 HTML?

    Thread Starter webmistress666

    (@webmistress666)

    Negative to both. I’m not using paid version, just the free version, and {TITLE} is rendering the anchor, using a permalink as the URL, and the Title as the text. It’s plain text when used in the Subject, but once it’s in the content, it becomes a link on its own.

    Thread Starter webmistress666

    (@webmistress666)

    I’m guessing this is it, on line 505 in ‘class-s2-core.php’?

    // we set these class variables so that we can avoid
    // passing them in function calls a little later
    $this->post_title = "<a href=\"" . get_permalink($post->ID) . "\">" . html_entity_decode($post->post_title, ENT_QUOTES) . "</a>";

    @webmistress666,

    Okay, we the solution I was thing of won’t work then if you are using the free version.

    Have you tried nesting a span element inside the table elements like this:
    <td><span style="color:#fff!important;text-decoration:none!important;">{TITLE}</span></td>

    Thread Starter webmistress666

    (@webmistress666)

    Unfortunately, no. The inline CSS must be on the anchor or the anchor’s child element to have effect.

    See fiddle:
    http://jsfiddle.net/xn3BU/1/

    @webmistress666,

    In that case you can inject some custom CSS into the email header with a little plugin to Subscribe2 like this:

    function custom_s2css_filter($email) {
    if ( empty($email) ) { return; }

    list($first, $second) = explode('</head>', $email, 2);
    $email = $first . "<link rel=\"stylesheet\" href=\"http://www.mysite.com/custom_style.css\"></head>" . $second;

    return $email;
    }

    add_filter('s2_html_email', 'custom_s2css_filter');

    Of course you then need to create the right CSS to apply to the final email.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Link Color in HTML Template?’ is closed to new replies.