Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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

php in footer.php - links to just show up on homepage


  #1  
Old Dec 20, 2008, 08:39 AM
chris's Avatar
chris
 
39 posts · Dec 2008
essen@nrw.de
Hello,

I used to have some links that only show up on the "home" page -
I have had following code in my previous theme

PHP Code:
<?php if($HTTP_SERVER_VARS['REQUEST_URI']=="/") : ?>
<p>link1 ... link2</p>
<?php endif; ?>
this didn't work anymore ... no links show up on the homescreen or elsewhere ...

I placed it right over

HTML Code:
		</td>
		<!-- / Footer -->
in footer.php

any idea?
  #2  
Old Dec 20, 2008, 12:21 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Not sure why but you could try this:

PHP Code:
<?php if ( is_home() AND !is_paged() ) { ?>
links
<?php ?>
or if you're using a static page as the homepage

PHP Code:
<?php if ( is_front_page() ) { ?>
links
<?php ?>
  #3  
Old Dec 20, 2008, 12:38 PM
chris's Avatar
chris
 
39 posts · Dec 2008
essen@nrw.de
Thanks - that works.
  #4  
Old May 9, 2010, 11:22 AM
copywrite
 
2 posts · May 2010
Why doesn't this work for me? I am trying to output this sitemap link only on the homepage.

On the footer.php file I have
PHP Code:
<?php wp_footer(); ?> <?php get_footer(); ?> <?php if ( is_home() AND !is_paged() ) { ?>
<a href="sitemap.xml">Sitemap</sitemap>
<?php ?>
I have tried adding the html code in the WP admin footer but the link is shown across all pages.

How can I get this to work? Thanks
  #5  
Old May 9, 2010, 11:36 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
What version of Atahualpa and WP?
When I put that code in replacing line 92 (in version 3.4.6) I only see the link on the first of my blog pages.
Have you made anyother modifications?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #6  
Old May 9, 2010, 11:52 AM
copywrite
 
2 posts · May 2010
Thanks for the reply. It is a theme I downloaded.

Uopdated: I am trying to output this sitemap link only on the homepage.

On the footer.php file I have
PHP Code:
HTML Code:
<?php get_footer(); ?>
HTML Code:
I added this code in the WP admin html footer that I found on the net
 <?php if ( is_home() AND !is_paged() ) { ?> 
<a href="sitemap.xml">Sitemap</sitemap> 
<?php } ?>
 
that didn't work so I tried this
<?php if ( is_home() ) { ?> 
<a href="sitemap.xml">Sitemap</sitemap> 
<?php } ?> 
but the link is shown across all pages.

How can I get this to work? Thanks[/php]
  #7  
Old May 9, 2010, 12:50 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
If it is not atahualpa, I suggest you go ask the themes author
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
make index.php be a "page" and blog postings go to different php page zhidoni Atahualpa 3 Wordpress theme 0 Jun 21, 2009 04:25 PM
[SOLVED] messed up header.php and footer.php monochrome Header configuration & styling 0 Jun 20, 2009 02:16 PM
request: please add "links.php" page template. dhani Atahualpa 3 Wordpress theme 0 May 22, 2009 03:36 AM
how do i get comments to show up on homepage for each post??? drewjones Comments, trackbacks & pings 2 Apr 15, 2009 07:04 PM
Post PHP on one page only, and not homepage blueprairie Plugins & Atahualpa 2 Apr 2, 2009 07:28 AM


All times are GMT -6. The time now is 05:44 PM.


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