Title: Change/Replace Text
Last modified: August 16, 2023

---

# Change/Replace Text

 *  [asifmd07](https://wordpress.org/support/users/asifmd07/)
 * (@asifmd07)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/change-replace-text/)
 * Hii there ,
 * I want to change and replace the Text using CSS in WordPress , If you visit the
   Link , under What’s Included You will find A List .
 * I want to replace “Dinner” with ” Lunch” & also I want to change “Lunch” with
   Dinner” respectively .What would be the exact CSS Code for that ? Please if you
   can help .
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fchange-replace-text%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [rohitmukati](https://wordpress.org/support/users/rohitmukati/)
 * (@rohitmukati)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/change-replace-text/#post-16977084)
 * Hii
   I think this is may not possible with css but yo can do it using jQuery easily
   this is example using jQuery [https://codepen.io/sam620/pen/JzavEw](https://codepen.io/sam620/pen/JzavEw)
 *  Thread Starter [asifmd07](https://wordpress.org/support/users/asifmd07/)
 * (@asifmd07)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/change-replace-text/#post-16979213)
 * How to exactly do it in WordPress ?
 *  [rohitmukati](https://wordpress.org/support/users/rohitmukati/)
 * (@rohitmukati)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/change-replace-text/#post-17005431)
 * For example we have 2 div
 *     ```wp-block-code
       <div class='open'>Challenge going on now!</div>
       <div class='closed'>Challenge has ended</div>
       ```
   
 * 
   Use this code in funcation.php
 *     ```wp-block-code
       <?php
   
       function add_this_script_footer(){ ?>
   
       <script>
           $(document).ready(function () {
   
           var start = new Date();
           var end = new Date();
           var time = new Date().getTime();
   
              //Set the start hours and ending hours
           if (time > start.setHours(07,30) && time < end.setHours(19,30)) {
               $('.open').show();
               $('.closed').hide();
           }
           else {
               $('.open').hide();
               $('.closed').show();
               }
           });
   
       </script>
   
       <?php } 
   
       add_action('wp_footer', 'add_this_script_footer');
       ```
   
    -  This reply was modified 2 years, 9 months ago by [rohitmukati](https://wordpress.org/support/users/rohitmukati/).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Change/Replace Text’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [rohitmukati](https://wordpress.org/support/users/rohitmukati/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/change-replace-text/#post-17005431)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
