• Resolved charleenf0726

    (@charleenf0726)


    hi,
    instead of hardcoding contact info into the page, I used the php code widget to use variables already exist in the site. It works out quite well inside of Elementor preview and Chromium. But it just doesn’t come out right in Chrome nor other browsers. what could be the issue? it seems that the variables are not coming through.

    my code (sorry i’m totally beginner):

    
    <div><table border="0">
    <tr><td width="40" valign="center" align="center">  
    <?php $contact_no = get_theme_mod('contact_no'); ?>
    <img src="https://flexchair.uk/wp-content/uploads/2018/03/phone-icon.png" height="30" width="30" /></td><td valign="center"><?php echo $contact_no; ?>           
    </td></tr><tr><td valign="center">             
    <?php $contact_mail = get_theme_mod('contact_mail'); ?>          
    <img src="https://flexchair.uk/wp-content/uploads/2018/03/mail-icon.png" height="30" width="30" /></td><td valign="center"><a>"><?php echo $contact_mail; ?></a></font>
    </td></tr><tr><td valign="center">
    <?php $contact_add = get_theme_mod('contact_add'); ?>                         
    <a>"><img src="https://flexchair.uk/wp-content/uploads/2018/03/FB-icon-1.png" height="30" width="30" /></a></td><td><a>"><?php echo $contact_add ?>/</a></td></tr>
    </table></div>
    

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    I edited your post to convert the lt’s and gt’s back into the proper < and > symbols.

    Looking at your page, it appears that you have some lt’s and gt’s in your code, instead of the proper less than and greater than signs used for HTML. Edit the code to fix that and it should work out for you.

    Thread Starter charleenf0726

    (@charleenf0726)

    Thanks Otto,
    but it still doesn’t work. (even with redundant “>” in Chromium now)
    and in Chrome, still these variables are not shown.

    charleen

    Plugin Author Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Unfortunately, there’s nothing more I can do to help you.

    The PHP Code Widget is essentially a Text Widget (which changed to an HTML widget in the last few versions of WP), with the only difference being that it runs your PHP Code. if you don’t have your PHP Code right, then the widget won’t fix it.

    However, the widget won’t mess with it either, it runs exactly what you give it and nothing different. So any problems with it are in your code, not in the widget.

    Maybe using just a plain text widget, or an HTML widget, is a better idea. It’s not good to run PHP code from the database anyway, and I recommend using that instead of this widget.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘issues in chrome!’ is closed to new replies.