Wordpress custom theme development

Discussion in 'WordPress' started by webwebby, Sep 24, 2013.

  1. #1
    Hello


    I am working on a custom WordPress theme. On main page, I am showing 10 latest posts and have added a static button called “View all posts” linking to a page where all posts are showing with paging.


    Now below are my questions

    1. How do I link the button to that page showing all posts (which is a custom template page). If I add it as ?page_id=96 then it shows the id even when I change the URL permalink structure

    2. I have two type of posts, one is standard blog posts, other are products, how do I differentiate them as they will be using two different single.php pages.

    3. On homepage, products are shown, I want to link them to single.php which will show product details, may be we name that as single-product.php. So for this, what will be the anchor tag for products on homepage? I am using <?php the_permalink() ?> for now


    Please help on this.


    Thanks in advance
     
    webwebby, Sep 24, 2013 IP
  2. Skoepie

    Skoepie Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    I would say:

    1. Guess this has something to do with the archive.php template. "Show all" should link to this with a query showing all posts in the layout you set in this template php
    2. you create different single.php, like single-customposttype.php:
    http://wordpress.org/support/topic/custom-post-types-to-custom-singlephp
    3. you should you the slug of your custom post type in the url i guess.

    Hopes this helps.
     
    Skoepie, Sep 24, 2013 IP