81 | Injecting Multiple adsense Ads into a WordPress Loop

g+

The versatile code injects for instance adsense ad codes several times into the posts of an index or archive page, starting with a pre-set post, and then repeated in regular intervals (up to a set limit of ads per page).

For example, in a child theme of Twenty Fourteen, this code would be added into content.php at a suitable location:

<?php 
//set the variables//
$nth = 3; //1,2,3,,4...; repeated every n-th post
$snr = 1; //1,2,3...; pre-set start with post nr
$limit = 3; //adsene TOS limit of ads per web page

$lsnr = $snr - 1; // correct for loop counter start at zero

if( $wp_query->current_post >= $lsnr && ( $wp_query->current_post - $lsnr )%$nth == 0 && (int)(( $wp_query->current_post - $lsnr ) / $nth ) < $limit ) { ?>
ADSENSE CODE
<?php } ?>

The example values would start the add in the first post, and repeated every three posts for a maximum of 3 ads.

Posted in Tips & Tricks, Twenty Fourteen, WordPress | Tagged , | Leave a comment

80 | Scandinavian Style Miniature Sofa wt Golden Silk Cover

g+

From the workshop:

A miniature 1/3 scale sofa upholstered with golden Dupioni silk. Heavy solid wood armrests with wax finish give this settee a Scandinavian design look. Fits 18 inch dolls like the American Girl ® Doll, or for your favourite teddy bear.

miniature sofa upholsterd with gold dupioni silk with solid wood armrests

A one third scale miniature settee, upholstered with golden Dupioni silk, with solid wood armrests, fit for your favourite teddy or doll.

Overall measurements approximately 35 * 21 * 23 cm (13 1/2 * 8 1/4 * 9 1/16 inch).

Posted in Craft and Design | Tagged , , , , , , , , , , , , | Leave a comment

79 | A Miniature Vintage Style One Seater Silk Covered Sofa fit for an American Girl (R) Doll

g+

  The latest product from my wood working workshop: a vintage style upholstered miniature one seater sofa fit for an American Girl ® doll – 1/3 scale, wooden frame with upholstery foam and wadding, covered with luxurious purple dupioni silk. … Check the whole post »

Posted in Craft and Design | Tagged , , , , , , , , , , , , , , | Leave a comment

78 | A Real ‘Full Width Page’ Template for Twenty Fourteen

g+

To create a real full width page – with no sidebars whatsoever – in your WordPress site while using a child theme of the default theme Twenty Fourteen, program this page template file with the file name real-full-width.php (important as … Check the whole post »

Posted in Easy Coding for Wordpress, Twenty Fourteen, WordPress | Tagged , , , | 4 Responses