• Hi!

    This is probably realy easy if you know wordpress, but i’m adding Uji Countdown plugin to my header. I’m adding this to the header.php: <?php echo do_shortcode(‘[ujicountdown id=”test” expire=”2013/01/25 12:00″]’); ?>

    This works fine, but I wan’t to have some text before like “it begins in:”. When I add text like: <h1>We begin in:</h1> or <p>We being in:</p> it gets added on the line above or the line below. How do I add it to the same line?

    Have a great new year!

Viewing 14 replies - 1 through 14 (of 14 total)
  • Try putting it between <span></span> or just not put it in between any HTML.

    Thread Starter cledus_

    (@cledus_)

    Thanks for the reply! Do you mean like this:
    <div id=”countdown”>
    <div class=”container”>
    <span>
    <h1>We start in:</h1><?php echo do_shortcode(‘[ujicountdown id=”main” expire=”2013/04/25 12:00″]’);?>
    </span>
    </div>
    </div>

    No, the below should work.

    <div id="countdown">
    <div class="container">
    <span>We start in: <?php echo do_shortcode('[ujicountdown id="main" expire="2013/04/25 12:00"]');?></span>
    </div>
    </div>

    But I would need to know the format of the output of the counter to know for sure.

    Thread Starter cledus_

    (@cledus_)

    It didn’t work. How do you mean “format of the output of the counter”

    Got a link to your site where it is at? Much easier to help.

    Thread Starter cledus_

    (@cledus_)

    Sorry for the delay in my reply. I’m so grateful for your help! Here’s the url: https://redmountainfilm.se/wp/

    Thread Starter cledus_

    (@cledus_)

    Is there anyone else who might know how to solve this?
    Thanks!

    You need to edit the plugin and find where it outputs the countdown code and enter the text you want in there.

    The way I would do it is just search each file for

    <div id="ujiCountdown"

    Then that is where the output should begin.

    Thread Starter cledus_

    (@cledus_)

    Thank you so much! I will try it and I’m sure it will work!
    Thanks again!

    Thread Starter cledus_

    (@cledus_)

    I have tried and I can’t seem to make it work. Here’s where I try to insert my text
    `wp_enqueue_script(‘js_countdown’);

    return strip_shortcodes(‘<div id=”ujiCountdown”‘.$classh.’></div>’.$content);
    }
    }
    add_shortcode(“ujicountdown”, “ujic_code”); `
    But it doesn’t work. I it all ends up on the line above or the line below. Sorry but I’m really bad at this!

    What did you try to change it to? Have you asked the developer for help yet?

    Thread Starter cledus_

    (@cledus_)

    Yes I have tried to ask the developer but no luck.
    I have tried: ‘we start in: <div id=”ujiCountdown”‘.$classh.’></div>’.$content);
    Which ads it on the row abow. And I have tried:
    ‘<div id=”ujiCountdown”‘.$classh.’></div> we start in: ‘.$content);
    Which ads it on the row below. If I ad it inside the div it doesn’t show.

    What about

    <div id="ujiCountdown"'.$classh.'>We Start In:</div>

    Thread Starter cledus_

    (@cledus_)

    No if I add it inside the div it doesn’t show up. Would it help if I gave you an login to the wp page?

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Adding text before a countdown plugin’ is closed to new replies.