• Resolved Settler7

    (@settler7)


    I would like to have my tags just under my post. Just like the category that the post belongs to.

    The problem is I want the tags on the left side and the category on the right side by in the same line.

    My code at this part is…

    <div class="entry-bottom">
    <span class="categories"><?php the_tags('Relevant tags: ',', '); ?></span>
    <span class="categories"><?php the_category(', '); ?></span>
    </div>
Viewing 9 replies - 1 through 9 (of 9 total)
  • You need to create different classes for each span, such as tags and categories. In your css file, you need to assign a float attribute to both, and have your tags class floated to the left, and categories class floated to the right.

    HTML:

    <div class="entry-bottom">
    <span class="tags"><?php the_tags('Relevant tags: ',', '); ?></span>
    <span class="categories"><?php the_category(', '); ?></span>
    </div>

    CSS:

    .tags{float:left;}
    .categories{float: right;}

    Thread Starter Settler7

    (@settler7)

    Thanks a lot!

    It worked perfectly. The only thing I need is to have it in a box. When in class “categories” it has a box around to make it more visible.

    Thank you again!

    Did you want one box around both, or two seperate boxes?

    Did you want one box around both, or two boxes total?

    Thread Starter Settler7

    (@settler7)

    Two boxes.

    There is a box for the “categories” link. “Relevant tags” appeared at the left as I wanted but without box around. I’m trying to find the style.css code for the “categories” box but I’m a bit crap…

    You could set up id’s for the two spans. I would change the “categories” class name to “meta”, or whatever you wanted, and then give the two spans a class and id attribute. Just make sure whatever you rename the class isn’t already used. To find the css code, just do a ctrl+f, and search for .categories.

    HTML:

    <div class="entry-bottom">
    <span class="meta" id="tags"><?php the_tags('Relevant tags: ',', '); ?></span>
    <span class="meta" id="categories"><?php the_category(', '); ?></span>
    </div>

    CSS:

    #tags{float:left;}
    #categories{float: right;}

    And just change the .categories to .meta

    Thread Starter Settler7

    (@settler7)

    All I did was to remove the box about categories too. I cannot find where this box is defined.

    What I mean with box is the same with the box at the end of this post.

    https://mostfish.com/china-now-worlds-second-biggest-economy/224352/

    I cannot provide mine because I’m working locally on it.

    Thank you again!

    Thread Starter Settler7

    (@settler7)

    Any idea?

    Thread Starter Settler7

    (@settler7)

    Problem is solved. I had to create the category at the style1.css file and then uploading it via an ftp manager.

    Thanks again charles.murphy for his crucial help!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Tags place under post’ is closed to new replies.