• Resolved rarefires

    (@rarefires)


    Hello,

    I’m trying to install the simplest of hit counters on my site, https://www.ridgeblog.ca

    Here’s the instructions I have:
    1. Upload simplehitcounter.php to the /wp-content/plugins/ directory.
    2. Activate the plugin through the ‘Plugins’ menu in WordPress.
    3. Place <?= simplehitcounter_hit(); ?> somewhere like the footer or sidebar.

    Steps 1 and 2 are simple. Step 3, I’m not sure how. Putting a line of code is not like dragging and dropping a widget in there.

    Can anyone help out?

    Thanks.

    – Greg

Viewing 5 replies - 1 through 5 (of 5 total)
  • You can that code in footer.php just after `wp_footer();
    ?>` before
    </body>

    Thread Starter rarefires

    (@rarefires)

    Hi govpatel,

    my theme (Twenty Eleven) doesn’t contain that line of code in footer.php

    Here is the entire footer.php – where would you put that piece of code for the plugin?

    [CSS moderated as per the Forum Rules. Please just post a link to your site.]

    Thank you..

    <?php wp_footer(); ?>
    ///think you place your line here!////
    </body>

    my theme (Twenty Eleven) doesn’t contain that line of code in footer.php

    It is there

    <?php wp_footer(); ?>
    Your code here
    </body>
    </html>

    Thread Starter rarefires

    (@rarefires)

    Thank you all… I found the right spot and it worked.

    https://www.ridgeblog.ca

    I think this kind of coding is called HTML… I am not really familiar with it. Can anyone recommend a good reference source to get me started on understanding the language?

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How do I add a line of code to a sidebar or footer?’ is closed to new replies.