How to change figure-caption font from h4

Hi all,

I have used the header section number suggested in, this conflicts with figure caption, because the figure caption font was set by “h4”, I also get the section number prefix in figure caption. How can I change the figure caption font? Do I have to write a another new figure in shotcodes myself?


Cascading Style Sheets.


As @maiki said you can use something like this in CSS: figure h4 { font-family: … }.

Another option is to copy this template code to your local /layouts/shortcodes/ folder and remove the <h4/> tag.

Your local shortcode will have a higher priority than the internal Hugo shortcode.

1 Like

@ Grob @maiki, Thanks, I think figure h4 { font-family: … } .can not solve my problem, since h4 still exist. Create a local template works good. :blush: