WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Tags do not appear in Main Page (8 posts)

  1. enlewof
    Member
    Posted 6 years ago #

    On my blog, http://allen.alew.org, I've added the tag template to the main page template where it says tags using the following code

    <p class="tagged"><span class="add_comment"><?php comments_popup_link('&rarr; No Comments', '&rarr; 1 Comment', '&rarr; % Comments'); ?></span><strong>Tags:</strong> <?php the_category(' &middot; '); ?> <?php the_tags(' &middot; ', ' &middot; ', ''); ?></p>

    However, while using that code, the tags are not showing up on the main page, but they are showing up on the category and archive pages. My guess is that it has something to do with my asides implementation I got from this guide.

    So is there some change that needs to be made to the asides implementation to allow tags to appear or is there something else wrong with my blog?

    I've uploaded the code to my main page here.

    Thanks for the help.

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    My bet is that you somehow changed the wrong file somewhere. That code is perfectly acceptable and should be showing the tags.

    But, when looking at your page source, it's not even showing the P's around the tags, which should show regardless of whether you even have tags or not.

    Only conclusion: That code is *not* what your site is running. Or you have WP-Cache running and forgot to clear out the cached pages to see your changes.

  3. enlewof
    Member
    Posted 6 years ago #

    I have taken out the page footer out of the main index template (which is where I have trouble with the tags) of my theme, and it was taken out.

    I've cleared wp-cache several times, and now am disabling it. But still no tags.

    I'm betting it has something to do with the way the asides are implemented. The code for my index page is above.

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    I've looked at the code for your index page, and the code is correct. Your asides have nothing to do with it. I also don't see how your footer is relevant.

    Did you even read what I said earlier? That code you posted for your index page is provably NOT what is on your actual site. Post what you are really running.

  5. MichaelH
    Member
    Posted 6 years ago #

    What about using setup_postdata($post) instead of start_wp?

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    start_wp() is deprecated, but it essentially does a setup_postdata(). Don't see how that would change anything.

  7. MichaelH
    Member
    Posted 6 years ago #

    Okay then, how about replacing start_wp() with the_post()?

  8. enlewof
    Member
    Posted 6 years ago #

    MichaelH,

    Replacing start_wp() with the_post() worked. It was something in the asides code after all. Thanks.

    Otto42,

    I did read what you said. I took out the footer to make sure that the index was what I was running. It was.

Topic Closed

This topic has been closed to new replies.

About this Topic