Insert picture in categories cards

Hello,
I’m customizing the plugin ExpertHive, and i would like to suggest to you an improvement.
Im doing like this way, but if you know another way to achieve the same tell me please.
On Home Page on Categories Card I would like to add pictures to the backgroud of cards.
So I went to the file wp-content\plugins\hivepress\includes\blocks\class-listing-categories.php and add to the HTML a div id for each cattegory, so when I’m loading the content on wp-content\themes\experthive\hivepress\listing-category\view\block\listing-category-image.php I can customize css and add a backgroud image to that element.
Customizing the theme is easy, i can use a child-theme but customizing the plugin is not good, because every time I have an update I loose my changes.
Can you add div id to the building HTML?
I did like this:
$output .= '<div id=' . str_replace("'","",$category->get_name()) . ' class="hp-grid__item hp-col-sm-' . esc_attr( $column_width ) . ' hp-col-xs-12">';
Or can you suggest other way of doing this request without manipulating the plugin?
Best regards,
Bernardo Barradas

Thank you for posting the solution. We will check the possibility of adding more layout options for categories. Also, here’s a related topic with some instructions for replacing icons with images Category images instead of icons - #6 by Omaas

Thanks,
This is another solution.
I will use this for now, but if i want to put a big picture all over the card, what I proposse could be an alternative, if you have any news on the future about this tell me please.
Regards,

Unfortunately there’s no simple code snippet for this, this would require advanced layout customizations. We’ll try to add more design options for the categories block.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.