• 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 to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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

    Thread Starter asifmd07

    (@asifmd07)

    How to exactly do it in WordPress ?

    For example we have 2 div

    <div class='open'>Challenge going on now!</div>
    <div class='closed'>Challenge has ended</div>



    Use this code in funcation.php

    <?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 1 year, 2 months ago by rohitmukati.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change/Replace Text’ is closed to new replies.