• Hi,
    I want to add a Horizontal line under the Author name and above the Post.
    What CSS code can be used to separate these?
    I do have a custom css manager plug in

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi there!

    Could you post a link to your website or let us know what theme you are using? Then we can do our best to help you out.

    Cheers ??

    Luke the Daft Duke

    Thread Starter Gil Tichon

    (@gil-tichon)

    It is not published yet but heres the link:
    https://Officials.co.il/WP/
    Running Mediaphase Lite theme

    Thread Starter Gil Tichon

    (@gil-tichon)

    If you already see the site, can you also help me removing the Red Categories from the top of the post? ??

    You can remove the red categories using this snippet of CSS:

    .newscategory {
      display: none;
    }

    You can paste this code in your child theme’s style.css or in a custom css plugin such as Simple Custom CSS.

    To add a horizontal line between the author name and the post content you will first need to create a child theme.

    Next,

    1. Create a folder within your child theme folder called ‘inc’

    2. Within that folder create another folder called ‘partials’

    3. Go to your parent theme folder and download these two files from mediaphase-lite/inc/partials :

    content-blog-default.php
    content-single.php

    4. Open up the first file (content-blog-default.php) and go to about line 65 and you will see this:

    <h1 class="singleposttitle"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>

    5. Directly below that line add this : <hr>

    6. So, in the end it will look like this:

    <h1 class="singleposttitle"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
    
    	<hr>
    
    	<p class="newsauthor"><?php _e( 'Posted By', 'mediaphase-lite' ); ?> <a
    
    			href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>"
    
    			class="authorname"><?php the_author(); ?></a></p>

    7. Open the content-single.php file and go to about line 57 and repeat the process from #4.

    8. Save both files and upload them to your child theme inside the inc/partials folder.

    Here’s a picture of the final result: Screenshot

    I hope that helps ??

    Cheers,

    Luke the Daft Duke

    Thread Starter Gil Tichon

    (@gil-tichon)

    Thanks a lot!

    I’ve actually made these changes in the main theme,
    Because I’ve already made some other changes in the theme.
    I try to see if I can figure out which files I’ve changed and reinstall the theme and make a Child Theme.

    Your welcome!

    It’s best to have a child theme otherwise, you will lose your modifications when the theme updates. So be careful pushing the update button until you have everything sorted ??

    Thread Starter Gil Tichon

    (@gil-tichon)

    I believe I can see which file I’ve changed by their size difference, can’t I?

    Maybe, but to be sure try comparing files:


    How to Find & Compare Different Changes in Your Files Code

    Thread Starter Gil Tichon

    (@gil-tichon)

    Yeah I’ve used date modified… Don’t know why I didn’t think about it LOL

    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Horizontal line under Autor name’ is closed to new replies.