-
AuthorPosts
-
October 17, 2014 at 1:21 pm #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'), ));
October 17, 2014 at 1:30 pm #337291Sorry 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'), ));
October 17, 2014 at 8:27 pm #337514And 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,
MarieOctober 19, 2014 at 2:55 am #337761Hi!
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,
IsmaelOctober 19, 2014 at 11:15 am #337928Thanks 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,
MarieOctober 20, 2014 at 4:21 am #338119Hey!
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,
IsmaelOctober 20, 2014 at 9:15 am #338209All right it works ! Thanks Ismael !
Best regards,
MarieOctober 20, 2014 at 9:44 am #338233Oops 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,
MarieOctober 22, 2014 at 10:19 pm #339779Hey 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!
JosueOctober 23, 2014 at 7:09 am #339935It greatly works Josue!
Thank you!
Cheers!
Marie -
AuthorPosts
- The topic ‘Replace the default video icon by another one’ is closed to new replies.