Site logo

Archived topic

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

3 replies · Started by Moses on December 11, 2022

Viewing posts 1–4 of 4

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

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>';
    }
});

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.

Try this:

.cat-links a {
    font-weight: 700;
    color: #f00;
}
This archived topic is closed to new replies.