WordPress.org

Forums

Page template and custom field (4 posts)

  1. kadrwabadam
    Member
    Posted 5 years ago #

    I'm trying to develop a page template for product page of my website. I have following questions:-

    1.) How can I display records in multiple columns? Like I want to display 3 products images in 1 row. By default, wordpress shows only 1 record.
    2.) How can I limit the display of products per page? Say I want to display 10 products in one page. How will I do that?
    3.) How pagination will work for product template? How can I configure it?
    4.) My understanding of adding products is:-
    - I'll add a page 'Products' and will set its template to 'Products' which would be written in products.php
    - I'll add a category 'Products'
    - I'll add new posts in 'Products' category
    - In my products.php (Product template file), I'll use <?php query_posts('category_name=Products') ?> so that page template could work for that particular category.

  2. esmi
    Forum Moderator
    Posted 5 years ago #

    1. Using a custom query and CSS that float each post/image left.

    2. Using a custom query

    3. See 2

    4. That seems about right.

  3. kadrwabadam
    Member
    Posted 5 years ago #

    thanks esmi. For point # 4, is there any better way?

  4. esmi
    Forum Moderator
    Posted 5 years ago #

    There's a pretty thorough example of a "page of Posts" template on this Codex page. You might find some useful code snippets that you can re-use.

Topic Closed

This topic has been closed to new replies.

About this Topic