WordPress.org

Ready to get started?Download WordPress

Forums

T(-) Countdown
[resolved] Hyperlink countdown (4 posts)

  1. cccwebmaster
    Member
    Posted 1 year ago #

    Hello,

    The countdown is implemented in the header of our website using do_shortcode. Is there a way to hyperlink the clock/before/after text so visitors can read more. Below is the code:

    backticks<div class="timer"><?php echo do_shortcode('[tminus t="2013-03-21 17:00:00" omitweeks="true" style="carbonlite" before=" Countdown to March 21
    " after=" Deadline for Senate to Introduce Bill" jsplacement="inline"/]'); ?></div>backticks

    Thanks in advance!

    http://wordpress.org/extend/plugins/jquery-t-countdown-widget/

  2. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    what happens when you use:

    <?php echo do_shortcode('[tminus t="2013-03-21 17:00:00" omitweeks="true" style="carbonlite" before=" Countdown to March 21
    " after=" <a href='http://example.com/page/'>Deadline for Senate to Introduce Bill</a>" jsplacement="inline"/]'); ?>

    Keep in mind that if you are using double quotes (") to assign the before and after attributes, then you will have to use single quotes (') to assign the a tag's href value.

  3. cccwebmaster
    Member
    Posted 1 year ago #

    Thanks for your response. I got a warning in place of the clock when i added a relative path to the page ==> Warning: Division by zero in ../wp-content/themes/fts/header.php on line 54

    When I added the full path to the page, I got an error message instead ==> Parse error: syntax error, unexpected T_STRING in ../wp-content/themes/fts/header.php on line 54

  4. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    Ah! You need to escape the single quotes used to define the href like so:

    <?php echo do_shortcode('[tminus t="2013-03-21 17:00:00" omitweeks="true" style="carbonlite" before=" Countdown to March 21
    " after=" <a href=\'http://example.com/page/\'>Deadline for Senate to Introduce Bill</a>" jsplacement="inline"/]'); ?>

    This has been tested, and it does work.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic