0

Hello Everyone, I am trying to edit the Sharing label text of Jetpack plugin but having a problem to target specific text for example

in jetpack sharing settings there is an option with input field called

Sharing label

to add text before sharing icons. I have written there

Love it? Share it

here i want to add css style of italic and bold to

 Share it

text but cannot do from text field as it not allow html tag. Is there any way i can target this specific share it text using css or function?

Here is piece of code btw with class assigned to that text

<h3 class="sd-title">Love it? Share it</h3>
  • btw i found an code online and trying it in function to add text and customize it from functions but is not working [link](https://gist.github.com/ramseyp/8811638) – user3574329 Jul 14 '17 at 11:48
  • by using css you can change the style of sharing title. you can use Jetpack title class. do not add new class. share your website link – Shital Marakana Jul 14 '17 at 11:50
  • i know i can change text with sd-title class but i dont want to change style of complete text i want to change style of text "share it" and here is link to site [link](http://aromabasket.co.uk/product/pecans-raw/) – user3574329 Jul 14 '17 at 11:55

1 Answers1

0

you can replace text by using java script and set css.

add below function in function.php

function myscript() {
?>
<script type="text/javascript">
jQuery( document ).ready( function( $ ) {
    jQuery( '.sd-title' ).html("Love it? <span class='share_it'>Share it</span>");
} );
</script>
<?php
}
add_action( 'wp_footer', 'myscript' );
Shital Marakana
  • 2,817
  • 1
  • 9
  • 12