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.
-
Hi
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!
[php]
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]
[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>
</div>
</div>