- This topic has 4 replies, 2 voices, and was last updated 7 years ago by
Steve.
Viewing 4 reply threads
-
AuthorPosts
-
-
January 23, 2015 at 4:37 pm #3208
hipsterbrownMemberI had a working widget on one WP install, in which I was building Piklist plugin containing that widget code. On other installs of the plugin, I keep getting this error while displaying the widget on the front-end:
Notice: Undefined index: widget in /home/vagrant/public/wp-content/plugins/piklist/includes/class-piklist-universal-widget.php on line 157Any ideas what may be causing this issue?
-
January 23, 2015 at 5:31 pm #3210
SteveKeymaster@hipsterbrown– Can you post the widget code here, or email to [email protected] ?
-
January 23, 2015 at 5:56 pm #3211
hipsterbrownMemberForm Code
<?php function check_key() { $winnower_settings = get_option('winnower_theme_settings'); $api_key_confirmation = $winnower_settings['api_key_confirmation']; if($api_key_confirmation == 'true') { return '<p>Your API Key is approved so the widget will show up.</p>'; } else { return '<p>Please enter an approved API Key.</p>'; } } piklist('field', array( 'type' => 'html', 'field' => 'widget_help', 'value' => check_key() ));Front-End Code
<?php /*** Title: Winnower Badge Description: Shows on pages with posts that you have published on The Winnower. ***/ global $post; $winnower_settings = get_option('winnower_theme_settings'); $api_key_confirmation = $winnower_settings['api_key_confirmation']; $ID = $post->ID; $pub_status = get_post_meta($ID, 'win_toggle', true); if($api_key_confirmation == 'true' && $pub_status == 'true' && !is_home()): $iframe_src = "https://staging.thewinnower.com/api/blog_badge?"; $blog_id = $winnower_settings['user_blog_id']; echo $before_widget; ?> <iframe src="<?= $iframe_src.'blog_id='.$blog_id.'&blog_post_id='.$ID; ?>" width="1000" height="440"></iframe> <?php echo $after_widget; endif;Thanks for your help.
-
January 25, 2015 at 8:48 am #3212
SteveKeymaster@hipsterbrown– It looks like Piklist doesn’t like widgets that have no settings. We’ll look into this.
-
January 26, 2015 at 12:06 pm #3214
SteveKeymasterWe will have this fixed in our beta version this week. Will email to you when it’s ready.
-
-
AuthorPosts
Viewing 4 reply threads
- You must be logged in to reply to this topic.