Tagged: changes, child theme, functions.php
-
AuthorPosts
-
May 25, 2014 at 8:01 pm #269738
Hello,
I’m using a child theme, what is the best way for me to change “Share this entry” to just “Share this”? I found the text in ‘helper-social-media.php’ but I am unsure whether I delete the word “entry” from helper-social-media.php and re-save the whole (slightly modified) helper-social-media.php page to my child theme /includes folder, or if this minor change is something that can be done by adding a filter or some other code in the child theme’s functions.php?If we have minor little changes such as this, do we make the change and save the entire page to our child theme for every item?
May 25, 2014 at 9:16 pm #269770Hey Riavon!
Try using this plugin to change specific strings:
https://wordpress.org/plugins/codestyling-localization/Cheers!
JosueMay 25, 2014 at 9:27 pm #269774Thanks Josue! But… I’m not sure that this is what I need. My question isn’t about localization, or translation, and it doesn’t have anything to do with languages. My question was asking you how best to go about making a specific (minor) change to the front end via an Enfold child theme.
May 25, 2014 at 9:34 pm #269775I see, sorry for the confusion. Try adding this to the theme functions.php file:
function modify_share_title(){ return "Share this"; } add_filter('avia_social_share_title', 'modify_share_title');
Cheers!
JosueMay 25, 2014 at 9:52 pm #269777Thanks! That IS exactly what I was asking about :) I understand now that we’re to modify things like this with php code placed in the functions.php file. However, sadly this code you gave me doesn’t work to make the change I am trying to make. I will see if I can figure this out on my own, or if you happen to know why it isn’t working and what I can try, that would be super.
May 25, 2014 at 9:58 pm #269778Hi!
That works on my end (child theme), where exactly are you putting the code?
Cheers!
JosueMay 25, 2014 at 10:06 pm #269781I put it at the end of my child theme’s functions.php. I’ve successfully done that for a couple of other items as well, and they work just fine.
Here is all that is in my child theme functions.php file right now:
add_theme_support('avia_template_builder_custom_css'); add_filter('avf_postgrid_excerpt_length','avf_increase_postgrid_excerpt_length', 10, 1); function avf_increase_postgrid_excerpt_length($prepare_excerpt) { return 120; } function modify_share_title(){ return "Share this"; } add_filter('avia_social_share_title', 'modify_share_title');
May 25, 2014 at 10:11 pm #269783Hi,
Can you create an administrator account and post it here as a private reply?
Regards,
JosueMay 25, 2014 at 10:17 pm #269788This reply has been marked as private.May 25, 2014 at 10:51 pm #269795Hi!
Done:
http://mythemetester.com/fringe-addiction-messenger-bags/I had to fix something in the parent theme (missing avia_social_share_title filter in /includes/helper-social-media.php), maybe that file wasn’t uploaded correctly.
Regards,
JosueMay 26, 2014 at 12:45 am #269835Wonderful, thank you so much! :)
May 26, 2014 at 1:03 am #269837You are welcome, glad we could help :)
Regards,
Josue -
AuthorPosts
- The topic ‘Change "Share this entry" to just "Share this"’ is closed to new replies.