Display your betting record with the WPCapper sidebar stats WordPress plugin

The number one website tool handicapper use is to display your betting record in the sidebar of your website. This simple html code allows the clients to follow your betting history, this also helps establish credibility.

I have received many email people wanting to get this WordPress plugin, I have not had much time to finish this because of all the services I am doing. So I posted the HTML code so you can paste this into the sidebar of your website.

So you can paste in this html code into the TEXT widget are of the sidebar

<—-code starts—–>

<body>
<table width=”237″ height=”192″ border=”0″>
<tr>
<td width=”122″><strong>NFL</strong></td>
<td width=”44″>19-8</td>
<td width=”69″>70%</td>
</tr>
<tr>
<td><strong>MLB</strong></td>
<td>36-12</td>
<td>76%</td>
</tr>
<tr>
<td><strong>FREE PICKS</strong></td>
<td>9-7</td>
<td>56%</td>
</tr>
<tr>
<td><strong>NCAAF</strong></td>
<td>2-0</td>
<td>100%</td>
</tr>
<tr>
<td><strong>NCAAB</strong></td>
<td>0-0</td>
<td>0%</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<p>&nbsp;</p>
</body>

<——code ends——->

This code pasted into the sidebar will have a nice padded typeset look.

Our Second Option

1. Paste the code after the get_header(); on archive.php

<——-code starts——–>

<div id=”content-archive” class=”<?php echo implode( ‘ ‘, responsive_get_content_classes() ); ?>”>

 

<?php if( have_posts() ) : ?>

<!– <table class=”archive_above”>
<tr><td>NHL 2014</td><td>80-30</td><td> 72.7%</td></tr>
</table>

<div style=”text-align:center;”>
<strong style=”color:#000; text-align:center;”><br>167-68-3&nbsp;&nbsp; *Longest Streak 12 Days<br>178-71-8&nbsp; * Longest Streak 11 Days</strong>
<br />
</div>–>

<?php
$ixxx = 0;

$child_pages = $wpdb->get_results(“SELECT * FROM $wpdb->posts WHERE post_type = ‘capper-stat’ AND post_status = ‘publish'”, ‘OBJECT’);
if ( $child_pages ) : foreach ( $child_pages as $pageChild ) : setup_postdata( $pageChild );

$post_categories = wp_get_post_categories( $pageChild->ID );
$cats = array();
foreach($post_categories as $c){
$cat = get_category( $c );
$cats[] = array( ‘name’ => $cat->name, ‘slug’ => $cat->slug );
}/// GETTING POST CATEGORY
$thisCat = get_category(get_query_var(‘cat’),false); // GETTING CURRENT PAGE CATEGORY

if($thisCat->name == $cats[‘0’][‘name’]){ // COMPARING BOTH CATEGORIES

if($ixxx == 0){
echo $pageChild->post_content;
$ixxx = 1;
}
}

endforeach; endif;
wp_reset_postdata();
?>

<table class=”archive”>

<tr><th>DATE</th><th>TEAM</th><th>SPREAD/TOTAL</th><th>W/L</th></tr>

<?php while( have_posts() ) : the_post();

 

// gettting totals and teams

$post = get_post();

$content = strip_tags($post->post_content);

$regexp = ‘/(.+)\((.+)\)/’;

if( preg_match( $regexp, $content, $match ) ){

 

$team = $match[1];

$total = $match[2];

}else{

$team = $content;

$total =””;

}

 

// getting loses/wins

$tags = wp_get_post_tags($post->ID,array( ‘fields’ => ‘names’ ));

if( in_array(‘win’,$tags) ){

$win_loss = ‘<div class=”win”></div>’;

}elseif( in_array(‘loss’,$tags) ){

$win_loss = ‘<div class=”loss”></div>’;

}else{

$win_loss = ‘pend’;

}

?>

<tr><td><?php echo $post->post_title; ?></td><td><?php echo $team; ?></td><td><?php echo $total; ?></td><td><?php echo $win_loss; ?></td></tr>

 

<?php

endwhile;

?>

</table>

<?php

 

else :

 

get_template_part( ‘loop-no-posts’ );

 

endif;

?>

 

</div>

<!– end of #content-archive –>

2. Create Post on with appropriate categories…

3. Post name should be the name of the date that you want to display under it “May 12th 2014″…

4. post content should be like this “Heat (-2)” where the text out side the bracket is TEAM name, date is the name of the post, SPREAD/TOTAL is the value that you are entering inside the brackets, W/L (Win or Loss) is according to the tag that you are going to set on the post, for win set it as “win” for loss set it as “loss” and for pending set it as “pend”…

5. install this plugin https://wordpress.org/plugins/types/ by downloading the latest version from the mentioned url.

6. After installation login in as admin to the wordpress Types -> Custom Types and Taxonomies -> Add Custom Post Type

Custom post type name plural: Cappers Stats
Custom post type name singular: capper stat
Slug : capper-stat

Select Taxonomies: Categories

then Save Custom Post Type, now you can able to see a new type of post option on the left side menu as “Cappers Stats”

7. Cappers Stats -> Add New , add new post with the post name exactly as same as the category then add the below table with you actual %

<table class=”archive_above”>
<tbody>
<tr>
<td>NBA 2014</td>
<td>81-30</td>
<td>72.7%</td>
</tr>
</tbody>
</table>
<p style=”color: #000; text-align: center;”><strong>167-68-3 *Longest Streak 12 Days</strong></p>
<p style=”color: #000; text-align: center;”><strong>178-71-8 * Longest Streak 11 Days</strong></p>

8. select the appropriate category from the category check boxes on the right hand side before publishing the post under “Categories”

9. after all this are done correctly and for example your category name is “mlb” you page will be like this: http://www.007vipsport.com/category/our-record/mlb/

10, if you have any questions are doubts on installation and setup feel free to contact us.

 

(Visited 321 times, 1 visits today)
Let Handicapping Websites show you a return on your investment in 180 days.

Contact Us
Password Reset
Please enter your e-mail address. You will receive a new password via e-mail.