Please Help ! Been trying for a week to display progress bar in a floating bar

Theme support is offered to verified customers by forum only. Support requests and solutions made by email, Skype, Envato or any other method will be redirected back to the forum.

This topic is: not resolved
  • In Progress
    Posted in: Social Reach  
  • Member
    September 13, 2017 at 9:56 pm #103952


    I need help with php. Im trying to show the active progress bar inside a floating bar. I have no problem showing the progress bar in single-campaign.php but its not working with in a floating content. All i get is an empty bar.

    I put in bold what i think the problem could be, its like my wp post cant understand $ signs.

    You will see [php] and [/php] because i use a plugin to use php in wp pages

    Thanks in advance!

    global $usermeta;
    // variables

    $old_date = get_post_meta( $post->ID, ‘_campaign_date’, true );
    $old_date_timestamp = strtotime($old_date);
    $new_date = date_i18n(get_option(‘date_format’), $old_date_timestamp);
    $old_time = get_post_meta( $post->ID, ‘_campaign_time’, true );
    $old_time_timestamp = strtotime($old_time);
    $new_time = date_i18n(get_option(‘time_format’), $old_time_timestamp);
    $zone = get_post_meta( $post->ID, ‘_campaign_zone’, true );
    $totalsupporters = countSupportForcampaignAll($post->ID);
    $expired = returnIsExpired($post->ID);
    $goalsupporters = get_post_meta( $post->ID, ‘_campaign_goal’, true );
    $twitter = get_post_meta( $post->ID, ‘_campaign_twitter’, true );
    $bio = get_post_meta( $post->ID, ‘_campaign_bio’, true );
    $story = get_post_meta( $post->ID, ‘_campaign_story’, true );
    $goal = get_post_meta( $post->ID, ‘_campaign_goal’, true );
    $link = get_post_meta( $post->ID, ‘_campaign_link’, true );
    $by_wordpress_user = get_post_meta( $post->ID, ‘created_by_wordpress_user’, true );
    $pie1 = of_get_option(‘primary_color’);
    $pie2 = “rgba(255,255,255,0.15)”;
    $pid = $post->ID;
    $daysleftforpie = returnDaysLeftForPie($post->ID, get_the_date(‘m/d/y’));
    $daysleft = returnDaysLeft($post->ID);
    $post_object = get_post( $post->ID );


    [php] if($totalsupporters == 0){$supporterspercent = 0;}else{ $supporterspercent = (100 * $totalsupporters)/$goal; } [/php]

    <div class=”pb-bar” style=”margin-bottom: 5px; margin-top: 5px;”>
    <div class=”progress progress-striped active bar-green” style=”margin-bottom: 0px; margin-top: 1px; height: 13px; width:100%”>
    <div style=”width: [php]echo esc_attr($supporterspercent);echo’%’; [/php]” class=”bar”></div>

    You must be logged in to view attached files.

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.