Pugs2411 Posted October 11, 2017 Share Posted October 11, 2017 (edited) Hi,I am very very new to php and I'm building a Wordpress site using a theme so please bear with me if I ask any obvious questions.My site is running php 5.6 and Wordpress is up to date.In the theme options a php file called theme_options.php should give various items to place on the page but I am getting this errorWarning: Invalid argument supplied for foreach() in on line 1114/websites/123reg/LinuxPackage21/co/ok/es/cookesproperty.co.uk/public_html/dev/wp-content/themes/homely/admin/theme_options.phpI have looked at line 1114 and this has this of code <?php $property_detail_items = get_option('rypecore_property_detail_items', $property_detail_items_default); $property_detail_items_order = get_option('rypecore_property_detail_items_order', $property_detail_items_order_default); foreach($property_detail_items_order as $value) { ?> The last line is line 1114Is there anything obvious I am missing?Thanks for any help at all!Lisa Edited October 12, 2017 by cyberRobot added [code][/code] tags Quote Link to comment Share on other sites More sharing options...
archive Posted October 11, 2017 Share Posted October 11, 2017 Have you checked to see if $property_detail_items_order is an array? And use code tags along with formatting when posting code, it makes it easier to read and you'll be more likely to get a quicker response. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.