• I’m not a programmer, and I have only a beginning knowledge of PHP. I am learning, bit by bit, but am still but a beginner…. That said: Where do I put something like the following?

    2. Upload to WordPress plugins directory
    3. Activate plug in
    4. Add this code to The Loop Where you want it to show (ie, after comments, post title, whatever)

    <?php this_day(get_the_time(‘F jS’))?>

    I’ve uploaded, put it in plug-ins, activated it…but where do I look to find the proper place for this line of code to go?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Generally, in the Main template file (the index.php that is in the theme folder). You can go to the Dashboard to Presentation | Theme Editor and select the Main template file.

    Then, it needs to go inside The Loop, which means you can put it anywhere that you want it to go as long as it is between:
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    and

    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>

    It’s mostly going to be governed by where you want it to end up in the post. Want it at the top of the post, then put it before the tag that calls the_content. Want it after the_content, put it there.

    Thread Starter dudley

    (@dudley)

    Thanks! that helps clear things up. Now this: it appears in my sidebar as “BBC Wikipedia”—how do I change its name and font value ?

    BTW There is a lot to learn, for those of us new to WP, but with patience and the level of support you offer, it can’t be beat!

    Thanks again.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Lost in “The Loop”’ is closed to new replies.