Viewing 15 replies - 1 through 15 (of 18 total)
  • [wctss_total_sales]
    This is the normal way to use shortcode and can be included in the page or post editor and also in widgets (for example in a text widget to the sidebar)

    <?php echo do_shortcode(“[shortcode]”); ?>
    Use this method if you’re writing the code into the theme files.

    Thread Starter mndo123

    (@mndo123)

    how can i add text beside it
    and make style for it
    to control color,background , etc
    i want in header

    which file i add
    and <?php echo do_shortcode(“[shortcode]”); ?>

    which file i add
    [wctss_total_sales]

    Does your theme allow for shortcode in the header?

    Many don’t so you’d need to modify the file that generates your header (most themes it’s header.php)and add in the php code where you want to add it.

    Formatting would be a matter of working out what the code outputs, then modify the stylesheet accordingly.

    NOTE: You will need a basic understanding of HTML and CSS to do this successfully.

    Thread Starter mndo123

    (@mndo123)

    i know the basic but not when comes to the shortcodes
    can give me example?
    thanks

    If you’re using a downloaded theme any changes you make may get overwritten by updates so you should create a child theme. There are plenty of tutorials available on how to do that. If your theme has been developed specifically for your site this won’t matter.

    Open up the header.php file within your theme (wp-content/themes/THEMENAME/header.php

    Work out where you want the total sales to appear and paste <?php echo do_shortcode(“[shortcode]”); ?>

    Check your site to see if this is working correctly.

    If you then need to format you’ll need to see what the shortcode is outputting and create CSS to suit. the default location for CSS is in styles.css

    Thread Starter mndo123

    (@mndo123)

    yes i know all that
    but i need help with
    outputting and create CSS to suit. the default location for CSS is in styles.css

    only

    have you already created the shortcode call in the header, if so, what is it outputting; is there any classes you can attach style calls to?

    If not, create a div to wrap the php call in your header file and target that. It doesn’t really matter where in the stylesheet you add the call, but I would suggest at the end of the file.

    Thread Starter mndo123

    (@mndo123)

    i past <?php echo do_shortcode(“[shortcode]”); ?>

    in header it appear shortcode

    when i past

    <?php echo do_shortcode(“[wctss_total_sales]
    “); ?>

    it appear 0.00

    what i need to add and where

    to make it

    sold items 0.00$

    Thread Starter mndo123

    (@mndo123)

    what is your site?

    Thread Starter mndo123

    (@mndo123)

    I’ve had a look at the site and can see a value field in the cart, but this doesn’t appear to be the plugin you’re talking about. Where is the 0.00 value sitting?

    Thread Starter mndo123

    (@mndo123)

    i removed it

    till know what missing ?

    Without seeing the plugin working on your site I’m unable to help any further.

    Moderator t-p

    (@t-p)

    For questions regarding this plugin, I recommend asking in its dedicated support sub-forum. There you will be more likely to find a good answer from its developers/users:
    See https://www.ads-software.com/support/plugin/woocommerce-total-sales-shortcode

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘how can i use this for woocommerce?’ is closed to new replies.