Retrieving Custom Field Dropdown Menu Value - What's wrong with my code?
WPMU DEV Community
Retrieving Custom Field Dropdown Menu Value - What's wrong with my code?
Inactive
39 pointsStarting to get into this DEV thingI'm new here
AC
Member
—
26th September 2011 (8 months ago)
Hello all,
I'm having a bit of trouble getting custom field dropdown menu values to display in my page. FYI - I created the dropdown menu in Custompress. There must be something wrong with my code, right?
The dropdown menu/select box code starts halfway through...
And here is the error message I get when I view the page:
Warning: Invalid argument supplied for foreach() in /home5/apowerin/public_html/smartdepartment/wp-content/wptouch-data/themes/sdpt1/iphone/mobile-coupon-list.php on line 29
Thanks as always you guys are a great help. Cheers!
I'm having a bit of trouble getting custom field dropdown menu values to display in my page. FYI - I created the dropdown menu in Custompress. There must be something wrong with my code, right?
The dropdown menu/select box code starts halfway through...
And here is the error message I get when I view the page:
Warning: Invalid argument supplied for foreach() in /home5/apowerin/public_html/smartdepartment/wp-content/wptouch-data/themes/sdpt1/iphone/mobile-coupon-list.php on line 29
Thanks as always you guys are a great help. Cheers!
This is working great, but would you happen to know how to display this information in an ordered list showing all of the posts (there will only be 10 max)? I just need a simple ordered list, outside of what wordpress and several themes already provide because this will display on mobile devices.
9603 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Sales & Support Pro
—
28th September 2011 (7 months ago)
#
That's a bit more than I can really help with here to be honest. It should be simple to use a foreach but if you're not overly comfortable coding you'd be best seeking help from a developer.
Responses (5)
Sales & Support Pro — 26th September 2011 (8 months ago) #
Hiya,
That error message is telling you that the value given isn't an array.
So, do something like this to find our what the value is;
Phil
Member — 26th September 2011 (8 months ago) #
Thanks Phil. That worked perfectly. You just made a big difference in my day!
Take care!
Member — 27th September 2011 (7 months ago) #
Phil,
This is working great, but would you happen to know how to display this information in an ordered list showing all of the posts (there will only be 10 max)? I just need a simple ordered list, outside of what wordpress and several themes already provide because this will display on mobile devices.
Thanks!
sd
Sales & Support Pro — 28th September 2011 (7 months ago) #
That's a bit more than I can really help with here to be honest. It should be simple to use a foreach but if you're not overly comfortable coding you'd be best seeking help from a developer.
Phil
Member — 30th September 2011 (7 months ago) #
Alright, thanks anyway Phil. Take Care!
Become a member