php - Retrieve data from MySQL database based on Wordpress Page ID -
i have travel guide website developing wordpress contains destination guides. on destination guides pages have sidebar displays destination statistics (currency, time zone etc).
i have create new sidebar each page each time changing these values. possible create mysql database these values , insert php code identify country page loaded , insert corresponding values can use single sidebar pages.
i proficient html/css understanding of php limited. advice how best achieved appreciated.
why don't use custom fields? they're arbitrary pieces of data can associate post/page. have key my_site_currency (make sure they're distinguishable , unique), , each guide page have different value key.
wordpress provides basic interface manage them, if want nicer ui (i.e. separate metabox just values on just guide pages in admin) might want check out advanced custom fields plugin.
Comments
Post a Comment