Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Undefined index Error while displaying widget #3211
    hipsterbrown
    Member

    Form 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.

    in reply to: Typecast Conditions Value for Select Field #3179
    hipsterbrown
    Member

    Hey Steve,

    Will send that zip shortly. Thanks for reaching out.

Viewing 2 posts - 1 through 2 (of 2 total)