Title: Extensive PHP Help Needed!
Last modified: August 20, 2016

---

# Extensive PHP Help Needed!

 *  [danielfein](https://wordpress.org/support/users/danielfein/)
 * (@danielfein)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/extensive-php-help-needed/)
 * Okay I don’t want to lose you here so try and bare with me. What I HAVE right
   now is the typical links on the homepage that link to a SINGLE post. What I want
   is for the links on the front page to link to all posts on one page, and i want
   to set it so that the first post on the homepage shows the first post but if 
   you click the SECOND link on the FRONT PAGE it goes to the new page where ALL
   of the posts are, but it scrolls down to the SECOND POST.
 * So basically I want all of the posts on one page but when you click the corresponding
   LINK on the FRONT PAGE it opens the NEW page and SCROLLS to the corresponding
   post.
 * Please post if you need me to explain further.
 * What I need is help setting this up. If you want to talk in private you can email
   me at _[email moderated]_. If not, if you can post on here to try and help me
   that would be great, thanks!
 * Best,
    Daniel

Viewing 1 replies (of 1 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/extensive-php-help-needed/#post-2280090)
 * most themes add a unique css id to the post div, which you can use as an anchor
   for the links from the front page;
    for all the posts on another page, you will
   need to create a page template [http://codex.wordpress.org/Pages#Page_Templates](http://codex.wordpress.org/Pages#Page_Templates)(
   starting with a copy of the front page template index.php; adding the template
   name, and a simple query to show all posts).
 * example codes from Twenty Eleven:
 * the linked post titles on the front page use the_permalink():
    `<a href="<?php
   the_permalink(); ?>" titl......`
 * the post div in the front page uses:
    `<article id="post-<?php the_ID(); ?>" 
   <?php post_class(); ?>>`
 * change the post title links on the front page to:
    `<a href="<?php $template_id
   = 37; echo get_permalink($template_id).'#post-'.$post->ID; ?>" titl......`
 * set this: `$template_id = 37;` to the page ID of the page with all the posts.

Viewing 1 replies (of 1 total)

The topic ‘Extensive PHP Help Needed!’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/extensive-php-help-needed/#post-2280090)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
