#1 (permalink)  
Old 02-19-2008, 03:48 PM
Registered User
 
Join Date: Jan 2007
Posts: 99
PHP linking to bottom of page..

I have a new website using Wordpress. Wordpress uses PHP. On the main page it loads header.php for the top of the page and whatever else it loads, but footer.php is on the bottom of the page. In the middle is where my content loads.

Is there a way to put a link on my menu in PHP that when clicked will take the user to the bottom of the page?

I saw this tutorial here:

http://bignosebird.com/docs/h17.shtml

But don't know how to get it right in PHP. I tried and screwed up.
Reply With Quote

  #2 (permalink)  
Old 02-19-2008, 09:51 PM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,445
You don't need PHP to do this. It's just simply HTML.

Find an element in the footer that has an ID assigned to it. If there isn't one, then assign one. Then, just link to that ID using a normal link with a hash symbol in front of the ID name.

For instance, let's say the footer is wrapped in a div like this:
Code:
<div id="footer">Footer text</div>
Then, you simply link to it like this:
Code:
<a href="#footer">Jump to the footer</a>
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 01:43 PM
Registered User
 
Join Date: Jan 2007
Posts: 99
So, it doesn't matter if the place I want to link to is in a seperate php file?

index.php loads up header.php as well as footer.php. In the header is the menu which will link to a section in the footer.

I did it, but take a look.. when you click the Music button it shifts everything over to the left:

http://www.gamesgorilla.com

I will have other buttons in the near future taking people to other sections on the bottom as well.

Last edited by yuppicide; 02-20-2008 at 01:52 PM.
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 03:44 PM
Deadeye's Avatar
Moderator
 
Join Date: Aug 2005
Location: San Diego, CA
Posts: 274
Send a message via MSN to Deadeye
it wont matter because the end result is 1 page from the 3 separate pages. I dont see a scroll to bottom in that website. Curtiss is correct on his html.

Wesley
__________________
Don't forget to rate me A+++++++++++++++++!!!!!111one for the service you have received.
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 03:45 PM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,445
yuppi - I don't even see a "music" button on that page.

To answer your question, though: no, it doesn't matter if the place you want to link to is in a separate file. When a PHP file is "included", all of the HTML it outputs becomes part of the HTML of the page in which it was included.
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote
  #6 (permalink)  
Old 02-20-2008, 04:28 PM
Registered User
 
Join Date: Jan 2007
Posts: 99
My apologies. I was fooling with the PHP and noticed some weird crap when I made a post, and a lot of what looked like some kind of Spanish or something. I didn't know how to fix all that and it looked to be too much.

I went back to default Wordpress theme and I am just now getting back here to post. I will find a suitable theme later or tomorrow and if I need help again I'll reply to this thread. Thanks.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
php redirect gilgalbiblewhee Programming and Scripting 3 12-22-2007 10:03 PM
Display Value (ie 28.3) dynamically in web page Bad Inferno Graphics and Flash 0 07-01-2007 06:03 AM
go to next page function ruthann Programming and Scripting 1 08-16-2006 08:02 AM
"session validation checking" in html page ...HELP dragon Programming and Scripting 4 08-15-2006 02:06 PM
PHP mail problems khelter Programming and Scripting 1 04-17-2006 08:36 AM


All times are GMT -5. The time now is 01:04 PM.

 
Bitrix
Clicky Web Analytics
CloudContacts
Maxtango


Subscribe to our feed | add to myYahoo!

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
© 1997-2007 HTMLCenter