Jump to content

very easy if you have any PHP knowledge, format 1 line code


mgason

Recommended Posts

I know nothing about PHP.

this code is supposed to create a countdown timer when used in a theme in wordpress. I need to use it in a php widget. The widget does not accept the short code PHP of [].

It needs a proper <?php ?> format.

I can not seem to guess what that is, hope someone can help

 

The following is from the plugin page.....

 

If you want to insert individual countdown timers, such as in posts or on pages, you can use the following shortcode:

 

[fergcorp_cdt_single date=ENTER_DATE_HERE]

 

Where "ENTER_DATE_HERE" uses PHP's strtotime function and will parse about any English textual datetime description.

 

this code does work to return a list of timers when placed in the php sidebar widget.

<li id='countdown'><h2>Countdown:</h2>
<ul>
<?php function_exists('fergcorp_countdownTimer')?fergcorp_countdownTimer():NULL; ?>
</ul>
</li>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.