Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Post-Kicker, -Byline & -Footer (http://forum.bytesforall.com/forumdisplay.php?f=17)
-   -   [SOLVED] Add footer item only to landing page. (http://forum.bytesforall.com/showthread.php?t=5218)

Velma Jan 8, 2010 10:58 PM

[SOLVED] Add footer item only to landing page.
 
I want to add a video to the bottom of only the Front Page (I have a static landing page). I can't see how to do that.

I did find this thread...

http://forum.bytesforall.com/showthr...ter+front+page

and thought I may be able to use it, but wasn't able to figure out how to use that with an embedded video from youtube.

Any ideas?

Velma

juggledad Jan 9, 2010 06:32 AM

Try this add the code to ATO->Style & edit CENTER COLUMN->Content BELOW the LOOP and surround it with
<?php if (is_front_page() ) { ...your code goes here... } ?>

Velma Jan 9, 2010 04:40 PM

That's what I tried. This is the error that shows up on the Front Page after I save the code.

Parse error: syntax error, unexpected '<' in /home/pdrags/public_html/strategicsense.ca/wp-content/themes/atahualpa/functions.php(478) : eval()'d code on line 1

It's youtube code I was putting in there.

juggledad Jan 9, 2010 06:26 PM

please cut and paste, exactly what you have in 'Below the LOOP', in a reply and befory you paste it, hit the little 'html' button so it will be surrounded by [ HTML ] [ /HTML ] so I can take a look

Velma Jan 9, 2010 07:11 PM

This is what I was putting in there. The first section is for the video. The rest is what's standard in there with the Theme.


HTML Code:

<?php if (is_front_page() ) { <object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/fgZwnDlM_ks&hl=en_US&fs=1&rel=0&color1=0xe1600f&color2=0xfebd01"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/fgZwnDlM_ks&hl=en_US&fs=1&rel=0&color1=0xe1600f&color2=0xfebd01" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object> } ?> 

<?php /* Displayed on SINGLE post pages if activated at ATO -> Next/Previous Navigation: */
bfa_next_previous_post_links('Middle'); ?>

<?php /* Load Comments template (on single post pages, and static pages, if set on options page): */
bfa_get_comments(); ?>


<?php /* Displayed on SINGLE post pages if activated at ATO -> Next/Previous Navigation: */
bfa_next_previous_post_links('Bottom'); ?>
               
<?php /* Archives Pages. Displayed on a specific static page, if configured at ATO -> Archives Pages: */
bfa_archives_page('<div class="archives-page">','</div>'); ?>
                       
<?php /* Displayed on MULTI post pages if activated at ATO -> Next/Previous Navigation: */
bfa_next_previous_page_links('Bottom'); ?>


juggledad Jan 9, 2010 07:28 PM

Change the first part to this
HTML Code:

<?php if (is_front_page() ) { ?>
<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/fgZwnDlM_ks&hl=en_US&fs=1&rel=0&color1=0xe1600f&color2=0xfebd01"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/fgZwnDlM_ks&hl=en_US&fs=1&rel=0&color1=0xe1600f&color2=0xfebd01" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>  <?php } ?>

Because you are mixing PHP and HTML you have to close the PHP before adding the HTML, then open the PHP for the end part.

Velma Jan 9, 2010 08:27 PM

OK! So what if I wanted to put something different on another page...say like a testimonial or something. How do I identify the other page? By the page number?

How would I phrase the if statement?

juggledad Jan 10, 2010 04:43 AM

check out http://codex.wordpress.org/Conditional_Tags to see all teh conditional tags and their structure

Velma Jan 10, 2010 08:56 AM

Perfect. Thanks.

I'm glad I found this place, and donated (and will add more later). I've learned a TON here already...both from asking and just reading.


All times are GMT -6. The time now is 08:51 PM.

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