• Resolved dmaeuk

    (@dmaeuk)


    im a designer / seo guy so please no grilling for my incompetence.

    i need to do this: <?php
    echo number_format("<?php echo do_shortcode('[product_count]') ?>");
    ?>

    format the shortcode number

    Any ideas? Killing me!!!!!!!!!!!!!!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter dmaeuk

    (@dmaeuk)

    SOLVED!!!!!!!!!! Worked it out

    <?php
    $count_posts = wp_count_posts('product');
    echo number_format("$count_posts->publish");
    ?>

    alternatively, try to use the string which is returned by ‘do_shortcode()’;

    example:

    <?php
    echo number_format( do_shortcode('[product_count]') );
    ?>
    Thread Starter dmaeuk

    (@dmaeuk)

    AGHH YES!!

    Thank you very much michael this will come in handy on other projects.

    Appreciate your time.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘echo inside of echo’ is closed to new replies.