Viewing 15 replies - 46 through 60 (of 88 total)
  • Anyway, always add css mods to the bottom of style.css. The style sheet is “cascading” meaning it reads everything from the top down, the last thing you add will over ride whatever came before.

    It has nothing to do with if your php output appears on the top or bottom.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Not just Esmi. ??

    can i post here my face to contact u ?

    That’s something that’s frowned upon and discouraged here.

    You are getting help here (thanks @deepbevel for that!) and if you’re patient then your CSS problem can be resolved.

    Thread Starter mndo123

    (@mndo123)

    sure thing and thank you

    if you put php code in the header, it’s gong to be at the top, unless you change that with css.

    Keep in mind that when you add php to your template, the output from that code will be positioned with the template position. In your case, it’s in the header, which is positioned at the top of your site. So what ever you do in the header will always be at the top.

    Yes I agree with Jan for obvious reasons. I just forget the rules a lot..

    Thread Starter mndo123

    (@mndo123)

    i made some changes before via firebug is it ok
    to play with php file after that

    Thread Starter mndo123

    (@mndo123)

    what do you mean with experiment with placement. ?

    You’ll be changing or adding new css, no matter if the original css was arrived at via Firebug. Just add anything new to the bottom. Then if you remove it, whatever you had before will come back.

    Thread Starter mndo123

    (@mndo123)

    what do you mean with experiment with placement. ?
    to start work with

    <div class=”my-totals”>
    <?php
    global $wpdb;
    $user_count = $wpdb->get_var( “SELECT COUNT(*) FROM $wpdb->users” );
    echo “<p>User count is {$user_count}</p>”;
    ?>
    </div>

    <div class=”my-totals”>
    <?php
    $args = array( ‘post_type’ => ‘product’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => -1 );
    $products = new WP_Query( $args );
    echo $products->found_posts . ‘total’;
    ?>
    </div

    Thread Starter mndo123

    (@mndo123)

    and i am got this is it ok ?
    woocommerce total sales shortcode plugin

    you’ll have to find the place in header.php where to put that, it will probably look better inside the “body” class. Every theme is different, so you’ll have to try different places to put it to see what you like.

    Yes, you need that woo plugin to get the shortcode that will output your total sales.

    but you can only use shortcode in your templates if you wrap it in php as I already demonstrated.

    Thread Starter mndo123

    (@mndo123)

    and how i will know if that the right place ?

    You have to look at it to see if it looks right to you, and obviously to make sure it doesn’t mess up anything else.
    If it looks bad, or messes up other things, move it somewhere else in the header, you’ll get the idea.

    Thread Starter mndo123

    (@mndo123)

    ok i got it

Viewing 15 replies - 46 through 60 (of 88 total)
  • The topic ‘what is the code for that ?’ is closed to new replies.