Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #337282

    Hey!
    I’ve tried to apply code given on #302398 but it doesn’t seem to work.
    Want to replace the default video icon by another one I have imported. (For blog page/posts mainly – second post on private link – and why not for the whole site).
    Here is the code I put in enfold child / functions.php
    Thanks for your help.

    Cheers!
    Marie

     $avia_config['font_icons'] = apply_filters('avf_default_icons', array(
     
        //post formats +  types
        'video'   		=> array( 'font' =>'entypo-fontello', 'icon' => 'ue808'),
    	
    	//image hover overlays
    	'ov_video'   		=> array( 'font' =>'entypo-fontello', 'icon' => 'ue808'),
    
    ));
    #337291

    Sorry I was wrong in my code. Changed it but still doesn’t seem to have any impact. (it’s a “fontello” style, not an “entypo-fontello” one.
    Thanks!

     $avia_config['font_icons'] = apply_filters('avf_default_icons', array(
     
        //post formats +  types
        'video'   		=> array( 'font' =>'fontello', 'icon' => 'ue800'),
    	
    	//image hover overlays
    	'ov_video'   		=> array( 'font' =>'fontello', 'icon' => 'ue800'),
    
    ));
    #337514

    And a second issue/question!

    N°2 /
    When you create a blog post in the admin, you can choose between 7 icons (cf. default, video, gallery, image etc..). Would it be possible to add another one ? I’ve already uploaded a “PDF” icon from fontello which I’d like to be able to choose for some specific posts.
    Thanks again!

    Regards,
    Marie

    #337761

    Hi!

    Thank you for using Enfold.

    You can refer to this link on how to change icons using filter on functions.php: https://kriesi.at/support/topic/customize-and-hide-some-post-formats/#post-232570

    Please refer to this link on how to add post formats: http://codex.wordpress.org/Post_Formats

    Best regards,
    Ismael

    #337928

    Thanks you Ismael but this is very confusing for me…
    https://kriesi.at/support/topic/customize-and-hide-some-post-formats/#post-232570 -> There are different subjects in this thread, php code to add, css code to add, depending on the subject… and it’s hard for me to sort it out!

    -> Forget about “how to add post formats”. I’ll eventually look to that later.

    -> But please can you be more precise on HOW TO CHANGE/REPLACE ICONS (the BLOG POSTS ones). What should I put in child functions.php & also (if needed) what should I add in child css file?

    Thank you for your patience and your help.
    Kind regards,
    Marie

    #338119

    Hey!

    If you want to replace the video and ov_video icons, you can use this:

    add_filter('avf_default_icons', 'avf_change_default_icons', 10, 2);
    
    function avf_change_default_icons($icons) {
    $icons['video']	= array( 'font' =>'entypo-fontello', 'icon' => 'ue800');
    $icons['ov_video']	        = array( 'font' =>'entypo-fontello', 'icon' => 'ue800');
    return $icons;
    }

    Note that you can only use icons that you uploaded using the Iconfont Manager from fontello.com.

    Regards,
    Ismael

    #338209

    All right it works ! Thanks Ismael !
    Best regards,
    Marie

    #338233

    Oops sorry! last question ->
    The “link” and “quote” post formats look diffently than the others.
    For example for the link post format -> on the main blog page -> the post title doesn’t appear -> instead we have “read more”…
    For quote format -> different formatting again.
    Is there a way to have those post formats looking like the default one ? -> always have the main post title appear in the main blog page.
    Thank you again!
    Kind regards,
    Marie

    #339779

    Hey Marie!

    Try adding this at the very end of your theme / child theme functions.php file:

    add_filter( 'init',  'alter_post_formats_formatting', 10);
    function alter_post_formats_formatting() {
    	add_filter( 'post-format-gallery', 'avia_default_title_filter', 10, 1 );
    	add_filter( 'post-format-video', 'avia_default_title_filter', 10, 1 );
    	add_filter( 'post-format-image', 'avia_default_title_filter', 10, 1 );
    	add_filter( 'post-format-link', 'avia_default_title_filter', 10, 1 );
    	add_filter( 'post-format-quote', 'avia_default_title_filter', 10, 1 );
    	add_filter( 'post-format-audio', 'avia_default_title_filter', 10, 1 );
    
    	remove_filter( 'post-format-gallery', 'avia_gallery_slideshow_filter', 10, 1 );
    	remove_filter( 'post-format-video', 'avia_video_slideshow_filter', 10, 1 );
    	remove_filter( 'post-format-image', 'avia_image_slideshow_filter', 10, 1 );
    	remove_filter( 'post-format-link', 'avia_link_content_filter', 10, 1 );
    	remove_filter( 'post-format-quote', 'avia_quote_content_filter', 10, 1 );
    	remove_filter( 'post-format-audio', 'avia_audio_content_filter', 10, 1 );
    }
    

    Cheers!
    Josue

    #339935

    It greatly works Josue!
    Thank you!
    Cheers!
    Marie

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Replace the default video icon by another one’ is closed to new replies.