WordPress.org

Ready to get started?Download WordPress

Forums

How to change Tag placement on Post? (5 posts)

  1. Eric Robert
    Member
    Posted 4 years ago #

    Is there a way of changing the tag placement from the posts, from top of the post to the bottom of the post?

    I like my theme that I have but don't like how it shows the tags before the post content.

    What code would I edit in the editor, which file?

    Any help would be awesome.

  2. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

    general, look in index.php and/or single.php, archive.php, category.php etc.
    look for the line of code with <?php the_tags( '<p>Tags: ', ', ', '</p>'); ?> where the code within the brackets could be different.

    however, knowing your theme could make this help more focussed ;-)

  3. Eric Robert
    Member
    Posted 4 years ago #

    I am using the theme Bwd 1 1.10

    I found the below code in the postInfo.php file. I tried switching the bolded part, below the other and that just changed the placement of the edit the post link. Any suggestions.

    <?php the_tags( '<li class="postTags"><span>Tags:</span> ', ', ', ''); ?>
    <?php edit_post_link('(edit this)', '<li class="editInfo">', ''); ?>

  4. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

    this is more complicated than ususal with the template files; you ned to take the tag code out from one file and put it into another:
    take this line out from postInfo.php:

    <?php the_tags( '<li class="postTags"><span>Tags:</span> ', ', ', '</li>'); ?>

    and copy it into postPagination.php (together with some extra code) so that postPagination.php looks like:

    <ul class="postInfo">
    <?php the_tags( '<li class="postTags"><span>Tags:</span> ', ', ', '</li>'); ?>
    </ul>
    <?php wp_link_pages(array('before' => '<p class="postPagination"><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>

    hopefully this does not destroy the layout ;-)

  5. Eric Robert
    Member
    Posted 4 years ago #

    you are freaking awesome. Thank you so much, that worked perfectly!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags