WordPress.org

Ready to get started?Download WordPress

Forums

Pulling in post to page. Can I show tags? (6 posts)

  1. ChrisHunt
    Member
    Posted 6 years ago #

    Hi,

    I've created a static frontpage that pulls in the latest post and all appears to be working fine but have just noticed that post my tags are not showing.

    Anyone know why tags are not showing? Category shows.

    This is my tag code: <?php if (function_exists('the_tags') ) {the_tags('<span id="tags"><strong>Tagged as:</strong> ', ', ', '</span>'); } ?>

    Any suggestions greatly appreciated.

    Thanks
    Chris

  2. Ivovic
    Member
    Posted 6 years ago #

    well, since the_tags() is a core function, there would be something terribly wrong if it didn't exist, so that's one check I think you can avoid.

    Having said that, there's no reason this wouldn't show, assuming that it's positioned within your loop on the front page.

    If you've created a loop using something other than the default varaibles, that could be the reason the_tags() can't find your tags.

  3. ChrisHunt
    Member
    Posted 6 years ago #

    Hmmmmmm, strange. This is my code for my static page. http://paste-it.net/public/gfdfcef/ Would anyone be kind enough to see if I have made a glaring mistake with my code?

    For some reason neither the_tags or comments_popup_link show at all.

    Lines 26-30 pull in my page copy

    Lines 32-84 pull in my 1st post plus a couple of plugins.

    Thanks for your time.

    Chris

  4. Ivovic
    Member
    Posted 6 years ago #

    well there are a couple of things I might change about that page... not the least of which is to close that second loop much much earlier.

    how about something like this? (note I haven't actually tested it and I don't have a url to your site, so I've not been able to get a wonderful impression of how this looks, so YMMV ;)

    http://wordpress.pastebin.ca/1041255

    I've also futzed with the indenting to make life easier on myself (not necessarily on you, sorry about that).

    that should clobber the appropriate variables to display your tags... and also avoid putting your left/center/right cols into your latest post loop.

  5. ChrisHunt
    Member
    Posted 6 years ago #

    Hi Ivovic,

    That worked a treat :)

    Thank you for taking the time to look at this, I also appreciate your pointers regarding loops and cols :)

    I just checked your site out - very nice indeed. What plugin are you using for pagination of posts on your site?

    My site is local at present.

    Best,
    Chris

  6. Ivovic
    Member
    Posted 6 years ago #

    You're welcome Chris, and cheers for the (far too) kind words :)

    I'm using WP-PageNavi by Lester Chan for that. Been using that plugin for a long long time. It's nice and simple.

    There are others to choose from though, particularly one called 'digg style page...' something or other, which looks quite powerful if you want the muscle-car version of pagination plugins.

    Drop a note in the Your WordPress forum here when your site goes live, so we can nit pick it, and steal your best ideas, ok? ;)

    Good luck.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags