Skip to content

Instantly share code, notes, and snippets.

View ahmedkaludi's full-sized avatar
🎯
Focusing

Ahmed Kaludi ahmedkaludi

🎯
Focusing
View GitHub Profile
@ahmedkaludi
ahmedkaludi / WordPress Loop with Google Structured Data.php
Created June 12, 2016 10:53
WordPress Loop with Google Structured Data
<?php
// checks if there are any posts that match the query
if ( have_posts() ) :
// If there are posts matching the query then start the loop
while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" role="article" itemprop="hasPart" itemscope="" itemtype="http://schema.org/Article">
<meta itemscope='itemscope' itemprop='mainEntityOfPage' itemType='https://schema.org/WebPage'/>
@ahmedkaludi
ahmedkaludi / WordPress Sample Loop.php
Last active May 5, 2019 10:52
WordPress Sample Loop
<?php
// checks if there are any posts that match the query
if ( have_posts() ) :
// If there are posts matching the query then start the loop
while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>">
<!-- 1. Title Start -->
@ahmedkaludi
ahmedkaludi / Retina Sprites Css markup
Last active June 6, 2016 01:24
Sample markup for the tutorial on Retina Sprites at http://ahmedkaludi.com/retina-sprites/
.candy ul{
list-style-type: none
}
.candy ul li{
display: inline;
list-style-type: none
}
.candy .candyicons a{
background: url(http://ahmedkaludi.com/wp-content/uploads/2016/06/retina-sprite-optimized.png) no-repeat;
/* Original Image size was 36kb. After optimizing it with TinyPng, the size went down to 12kb */
@ahmedkaludi
ahmedkaludi / Retina Sprites
Last active June 6, 2016 01:23
Sample markup for the tutorial on Retina Sprites at http://ahmedkaludi.com/retina-sprites/
<div class="candy">
<ul>
<li class="candyicons facebook"><a href="#"></a></li>
<li class="candyicons instagram"><a href="#"></a></li>
<li class="candyicons medium"><a href="#"></a></li>
<li class="candyicons snapchat"><a href="#"></a></li>
<li class="candyicons twitter"><a href="#"></a></li>
<li class="candyicons youtube"><a href="#"></a></li>
</ul>
</div>
#text-2 { /* change it to the proper widget id */
background: none;
border: 0;
padding: 0;
}