WordPress.org

Ready to get started?Download WordPress

Forums

I want to list my products. Should I do custom page or custom post? (2 posts)

  1. ftwpa
    Member
    Posted 4 months ago #

    Hi,
    Forgive me, but I am new to editing wordpress and I do not have a strong PHP background, but I make do. I will first tell you what I have done, and secondly, I will tell you about my concern of doing it the wrong way (ie, I didn't use any custom posts or a custom post page / template, this is where it is confusing to me)

    1. I am creating a page that lists products. I have installed advanced custom fields and have configured it properly to provide custom fields to my "posts". These custom fields are product attributes.

      It works. Whenever I want to add a new product, I click "add post" and, viola, all is well. I also have category "pages" which display a very nice table displaying the product name, ID#, price, etc (No, I don't need a shopping cart because they are large items and people usually make an offer, and the sale happens offline, instead of purchase online)

    2. Now this is my concern. All I did was edit the "content.php" page in order to customize my "product" / "post" output. I did this by retrieving the field as a variable inside of this page.
    3. Aren't I suppose to make a custom page? For example, content-product.php, or single-product.php ? <;i>What happens when I update wordpress, will it break?
    4. And if I do create say a content-product.php, or single-product.php, how do I register it so I can create new products?

    I feel like I'm missing something.....

  2. ftwpa
    Member
    Posted 4 months ago #

    PS - Using the twenty-fourteen theme.

Reply

You must log in to post.

About this Topic