Site logo

[Support request] Move Category Link Above Title In Archive Blog Roll Layout / Remove Icon

Home Forums Support [Support request] Move Category Link Above Title In Archive Blog Roll Layout / Remove Icon

Home Forums Support Move Category Link Above Title In Archive Blog Roll Layout / Remove Icon

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2457620
    Moses

    Good day! I’ve searched for some time now to find the solution here, with no luck – so here it goes.

    Trying to move the Category link, so that it appears above the title in the Archive Blog Roll on the Home Page and on the Category page(s). Would also like to remove the folder icon as well.

    I’ve attached an image with a simple reference.

    Also, I am hoping this can be accomplished without the use of Generate Blocks or having to build out a static Home Page layout. As flexible and robust as GB may be, I find it somewhat daunting to navigate with my simple mind … and my current project is rather basic in nature.

    Thank you in advance!

    Reference Image: https://ibb.co/YBSyqhz
    Reference Image

    #2458001
    David
    Staff
    Customer Support

    Hi there,

    try adding this PHP Snippet to your site:

    
    add_action('generate_before_entry_title', function(){
        if ( !is_single() ) {
    	echo '<span class="cat-links">' . get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'generatepress' ) ) . '</span>';
        }
    });
    #2458139
    Moses

    Thank you David. That seemed to do the trick. One last question … The CSS reference that calls on that Category Links text, for the purpose of styling… I cannot quite seem to find it. Pardon my novice nature. Let’s say for example I wanted to bold the text and make the font red.

    I was trying to reference .cat-links – but again.. I’m not the greatest at locating what div/class needs to be edited.

    Thanks again.

    #2458829
    David
    Staff
    Customer Support

    Try this:

    .cat-links a {
        font-weight: 700;
        color: #f00;
    }
    
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.