Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   how to add an iframe widget via code (http://forum.bytesforall.com/showthread.php?t=13742)

deyvazz Apr 11, 2011 05:06 PM

how to add an iframe widget via code
 
I am totally new to blogging and am clueless about coding, so forgive me if this seems an obvious post... :confused:

I am trying to add the code for an iframe widget to my homepage (not all pages). Since I have no idea how to code, I have no idea where to put the widget code so it is visible. I tried entering it into the Widget Content Box, but nothing appeared on the page. Can someone help direct me on what I need to do?

The code is: <iframe frameborder="0" scrolling="no" src="http://www.urbanspoon.com/b/posts_map/17/3579/Denver-restaurants" style="width: 200px; height: 200px; border: 2px solid #003399; background: #eee"></iframe>

And my page URL is: www.pickypatron.com

Please help!

juggledad Apr 11, 2011 05:30 PM

If you are going to start taking your web site beyond the defaults, you need to learn some HTML, PHP and CSS and experiment. A good place to learn is w3schools.com.

There are multiple ways to do what you want to do. One would be to put that code in the 'Content ABOVE the LOOP' option and surround it with a PHP 'if' statement using the WordPress conditional tags to test to see if you are on the home page. Doing this means you have to know how to escape in and out of PHP (you can't mix PHP and HTML directly)

Here is a sample that will display the message when you are logged in.
HTML Code:

<?php if ( is_user_logged_in() )  { ?>
<strong> Nice of you to log in!</strong>  <?php }; ?>

Now see if you can figure out how to do what you want to do.

lmilesw Apr 11, 2011 07:18 PM

And as that looks like a map you often can do a search for plugins to do what you want on wordpress.org.


All times are GMT -6. The time now is 01:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.