• Resolved ssqm20

    (@ssqm20)


    Hi,

    How can I change the default icon for date and category that appears below post to a custom one?

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello,

    You can add your custom icons using this code snippet:

    /**
     * Custom entry meta date icon.
     */
    function custom_sinatra_date_meta_icon( $icon ) {
    	return 'Date icon HTML markup goes here'; // Default: '<i class="si-icon si-clock" aria-hidden="true"></i>'
    }
    add_filter( 'sinatra_date_meta_icon', 'custom_sinatra_date_meta_icon' );
    
    /**
     * Custom entry meta date icon.
     */
    function custom_sinatra_date_meta_icon( $icon ) {
    	return 'Category icon HTML markup goes here'; // Default: '<i class="si-icon si-bookmark" aria-hidden="true"></i>'
    }
    add_filter( 'sinatra_date_meta_icon', 'custom_sinatra_date_meta_icon' );

    Add the code to functions.php of Sinatra Child theme or use a plugin for custom code such as Code Snippets.

    Thread Starter ssqm20

    (@ssqm20)

    Hello @hzlateska ,

    Will this work if add it using code snippets plugin?
    Thanks!

    Yes ??

    Let me know if it helps.

    Thread Starter ssqm20

    (@ssqm20)

    Hi,

    I have one more doubt regarding this. Is there anyway to remove the icons altogether?

    I tried using this in Additonal CSS

    .premium-blog-entry-meta span i::before {
    display:none;

    }

    It removes the icons, but there is a space where the icon would’ve been. Is there a way to fix this?

    Thanks, again

    Hey,

    There’s an option to enable or disable icons from the entry meta in Appearance ??Customize ? Blog ??Blog Page / Archive ??Show avatar and icons in post meta.

    Thread Starter ssqm20

    (@ssqm20)

    Hi,

    That option is already disabled. I’m using elementor to show blog posts in grid along with category and date.I have attached the link to a screenshot.
    When I add
    .premium-blog-entry-meta span i::before {
    display:none;

    }
    The icons disapper but leaves space instead.

    Screenshot

    Branko

    (@brankoconjic)

    Try this instead:

    .premium-blog-entry-meta span i { display: none !important; }

    I suppose .premium-blog-entry-meta is something custom, since that class is not from the theme.

    Thread Starter ssqm20

    (@ssqm20)

    @brankoconjic Yes! That worked fine.
    Thanks!:)

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Custom meta icons’ is closed to new replies.