manaalison on "Adding an iframe to the top of my wordpress homepage"

ساخت وبلاگ

manaalison
Member
Posted 3 hours ago #

Hey there,

I was asked to add a bar across the top of my wordpress homepage.
This is the code I was given:
<p><iframe width="100%" height="44" frameborder="0" marginheight="0" marginwidth="0" src="http://iwflsports.com/network/" scrolling="no"></iframe></p>

You can see the bar at the top of this page: http://iwflsports.com/

My question is...where do I add this code?

Would really appreciate any help.

On the homepage only or on all pages?

manaalison
Member
Posted 2 hours ago #

Only on the homepage

edit your theme's header.php file and add (in the appropriate place)

<?php
if ( is_home() || is_front_page() ) { ?>
<p><iframe width="100%" height="44" frameborder="0" marginheight="0" marginwidth="0" src="http://iwflsports.com/network/" scrolling="no"></iframe></p>
<?php } ?>

manaalison
Member
Posted 1 hour ago #

Thank you!!! How would I know what the appropriate place would be?

Near the top, probably inside the first <div>, but I can't tell since you have posted the URL for your site. In any case, it may require some tweaking to get it just right.

manaalison
Member
Posted 5 minutes ago #

I was able to get it to show up, but there is a space above and below the bar.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 34 تاريخ : چهارشنبه 25 فروردين 1395 ساعت: 2:52