• Resolved cccwebmaster

    (@cccwebmaster)


    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!

    https://www.ads-software.com/extend/plugins/jquery-t-countdown-widget/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Baden

    (@baden03)

    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='https://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.

    Thread Starter cccwebmaster

    (@cccwebmaster)

    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

    Plugin Author Baden

    (@baden03)

    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=\'https://example.com/page/\'>Deadline for Senate to Introduce Bill</a>" jsplacement="inline"/]'); ?>

    This has been tested, and it does work.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hyperlink countdown’ is closed to new replies.