i'm getting the following error on the homepage of a site I'm working on:
'Notice: Undefined index: active in /home/sites/tradehelp.co.uk/public_html/testweb/wp-content/themes/tradehelp/page.php on line 7'
I have downloaded the specified file but everything seems to be OK to me so can't figure out what it is. The page.php code is as follows:
<?php get_header(); ?>
<?php $meta = get_post_meta($post->ID, 'clicky_meta', true); ?>
<?php foreach($meta['page_sections'] as $section => $values) { ?>
<?php if ($values['active']) { ?>
<?php get_template_part('includes/blocks/section', $section); ?>
<?php } ?>
<?php } ?>
<?php get_footer(); ?>
<?php
$page_sections = array(
'content_1' => array('label' => 'Content Section 1'),
'icon_grid' => array('label' => 'Icons Grid'),
'app_banner' => array('label' => 'App Banner'),
'content_2' => array('label' => 'Content Section 2'),
'testimonials' => array('label' => 'Testimonials'),
'featured_video' => array('label' => 'Featured Video'),
'content_3' => array('label' => 'Content Section 3'),
'partners' => array('label' => 'Partners'),
'partners_small' => array('label' => 'Partners Small'),
'promotion' => array('label' => 'Promotional Area'),
'faqs' => array('label' => 'FAQs'),
'image' => array('label' => 'Image'),
'finance_calc' => array('label' => 'Finance Calculator'),
'case_studies' => array('label' => 'Case Studies'),
'benefits' => array('label' => 'Benefits'),
'statistics' => array('label' => 'Statistics'),
'latest_news' => array('label' => 'Latest News'),
'accreditations' => array('label' => 'Accreditations'),
'enquiry_form' => array('label' => 'Enquiry Form')
);
?>
<?php custom_sortable_field('page_sections', false, $page_sections); ?>
Thanks in advance