• Hi,

    I’ve setup a site listing various products and prices. Some products appear on multiple posts and pages therefore each time I need to update a price, I’m having to amend each and every entry.

    Is it possible to either, define variables in one of my themes php pages and call these variables within posts/pages or can I define variables in a WordPress (unpublished) page itself and again call via the other posts/pages?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You should realy have a database for this.
    I can promise you that the more products you get, the less controll you will have if you add them as posts.

    I don’t see any easy way of using variables like that with wordpress.

    Why not use e-commerse plugins?
    https://www.google.com/search?client=opera&rls=nb&q=wordpress+shopping+cart&sourceid=opera&ie=utf-8&oe=utf-8

    Thread Starter 810167

    Hi,

    Thanks for the reply. I thought maybe I could define a load of variables and then call them. Not so easy then eh!

    I just have a 4-5 weeks of experience with WordPress.
    When it comes to variables, it goes down like this:

    You can use any variable you want for any post / page.
    The value you enter in that varable is only valid for that specific post / page.
    If you want a variable value from a different post / page, you first have to retrieve that post / page.

    I would strongly suggest that you take a look at some e-commerce plugins for wordpress. Will save you a lot of time and frustration ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding variables’ is closed to new replies.