WordPress.org

Ready to get started?Download WordPress

Forums

Adding to get stats working (9 posts)

  1. rbetts
    Member
    Posted 2 years ago #

    Hi
    My stats counter stopped working after I changed themes. I'm told I need to add a line <?php wp_footer(); ?> to restart this. I right click on 'Appearance' on my dashboard, and activate 'Inspect Element'. I have done a little programming, but not PHP. I am unable to add the line at the bottom as instructed. Exactly how do I add a line?
    Any help much appreciated, Rob

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    You will probably need to edit your theme's footer.php template file and add the stats code just before the closing </body> tag.

  3. rbetts
    Member
    Posted 2 years ago #

    Hi
    Thanks for replying. The problem is that I don't know where to find the footer.php file and how to edit it. I tried to do this way: At my blog's dashboard (I am using Twenty Ten Theme) I scrolled down to 'Appearance' and right clicked it and selected 'Inspect Element'. I can see the PHP code and can see where I need to add the line of code at the bottom. But how do I edit this - or more exactly, what do I do to enable me to enter an 'edit mode', then (1) add a new line and (2) type the line of code I need, and then exit and save? Am I on the right lines here? Many thanks again, Rob

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    Don't right-click on Appearance. Just select "Editor" from the flyout menu. That said, don't edit the Twenty Ten theme. Instead create a child theme for your changes. You can download a basic Twenty Ten child theme from here.

  5. rbetts
    Member
    Posted 2 years ago #

    I will go ahead and try to create a child theme now- thanks for this. But as a matter of interest I don't have an Editor option in my Appearance flyout menu. I gather that if I want to use Google Analytics, I will also need to use the Editor (at least that's what Google Analytics say in their instructions). So at some stage I may need to use this Editor. I've seen a good YouTube video demonstrating this - it shows the Editor option under 'Appearance' in the screen shot and it all seemed very easy to do. The problem is, I don't have the Editor option, and I'm stuck. Do I have to upgrade to the professional version of WorPress to get this option to appear? Many thanks again, and sorry to come back again to you. Once I've got over this hurdle I shall probably be fine with all this. Rob

  6. esmi
    Forum Moderator
    Posted 2 years ago #

    Is this a wordpress.com site or a self-hosted WordPress install?

  7. rbetts
    Member
    Posted 2 years ago #

    Hi
    Thanks again for your reply, I appreciate this.
    This is a WordPress.com site that I have not (as far as I am aware) installed any software onto my own computer for (for example, I cannot find any .php files on my hard drive).
    The actual site is here:
    http://creationtonewcreation.wordpress.com/
    I believe now that's why there's no Editor under my Appearance. The motive for all this is to restore my stats function, which were working fine from the time I created the blog for three days, then stopped. I started with the Twenty Ten theme, under which the stats worked fine. The stats stopped when I tried out a couple of other themes (e.g. Twenty Eleven) and then reactivated Twenty Ten.
    I have also tried to solve the issue by deactivating all the Widgets, but without success.
    Many thanks, Rob

  8. esmi
    Forum Moderator
    Posted 2 years ago #

    These forums are for self-hosted WordPress sites only. Please try asking your question on http://en.forums.wordpress.com/

  9. rbetts
    Member
    Posted 2 years ago #

    Hi
    Yes, I've just done that now. Many thanks for your help on this
    Kind regards, Rob

Topic Closed

This topic has been closed to new replies.

About this Topic