Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Sidebars & Widgets »

how to add an iframe widget via code


  #1  
Old Apr 11, 2011, 06:06 PM
deyvazz
 
1 posts · Apr 2011
I am totally new to blogging and am clueless about coding, so forgive me if this seems an obvious post...

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!
  #2  
Old Apr 11, 2011, 06:30 PM
juggledad's Avatar
juggledad
 
23,682 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Apr 11, 2011, 08:18 PM
lmilesw's Avatar
lmilesw
 
10,174 posts · Jul 2009
Central New York State USA
And as that looks like a map you often can do a search for plugins to do what you want on wordpress.org.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.

Bookmarks

Tags
iframes, sidebar, widget

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add Google Analytics code TheSurvivalMom Forum How-To 3 Apr 15, 2011 03:58 AM
[SOLVED] add this code in a widget lambdaka Sidebars & Widgets 7 Jan 16, 2011 06:08 AM
Problem with google map iframe, IE scrolls down to post with iframe Björn Palovaara Center area post/pages 1 Apr 9, 2010 03:32 PM
How to add php code to a 'single' page JakeThePeg Center area post/pages 8 Mar 21, 2010 02:21 AM
I'm not sure what file I need add code for the sidebar jockoe Atahualpa 3 Wordpress theme 0 Mar 18, 2009 10:45 AM


All times are GMT -6. The time now is 09:30 PM.


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