This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### WordPress ### | |
# ignore everything in the root except the "wp-content" directory. | |
/* | |
!wp-content/ | |
# ignore everything in the "wp-content" directory, except: | |
# "mu-plugins", "plugins", "themes" directory | |
wp-content/* | |
!wp-content/plugins/ | |
!wp-content/themes/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul> | |
<?php $the_query = new WP_Query( 'posts_per_page=2' ); ?> | |
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?> | |
<li class="col-md-6"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a> | |
<?php | |
if ( has_post_thumbnail() ) { | |
the_post_thumbnail(); | |
} | |
else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="share-buttons"> | |
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>&text=<?php the_title(); ?>"><img src="http://alskadehem.se/wp-content/uploads/2014/04/facebook.png" alt="Facebook" /></a> | |
<a href="http://twitter.com/share?url=<?php the_permalink(); ?>&text=<?php the_title(); ?>" target="_blank"><img src="http://www.simplesharebuttons.com/images/somacro/twitter.png" alt="Twitter" /></a> | |
<a href="https://plus.google.com/share?url=<?php the_permalink(); ?>&text=<?php the_title(); ?>" target="_blank"><img src="http://www.simplesharebuttons.com/images/somacro/google.png" alt="Google" /></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// You might need to use wp_reset_query(); | |
// here if you have another query before this one | |
global $post; | |
$current_post_type = get_post_type( $post ); | |
// The query arguments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="http://www.linkedin.com/shareArticle?mini=true&title=<?php the_title(); ?>&url=<?php the_permalink(); ?>" title="Share on LinkedIn">Linkedin</a> | |
<a href="https://plus.google.com/share?url=<?php the_permalink(); ?>" onclick="javascript:window.open(this.href, | |
'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;">G+</a> | |
<a href="http://twitter.com/home/?status=<?php the_title(); ?> - <?php the_permalink(); ?>" title="Tweet this!">TWEET</a> | |
<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php the_title(); ?>" title="Share on Facebook.">SHARE FACEBOK</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<td style="display:none !important; visibility:hidden; opacity:0; color:transparent; height:0; width:0; mso-hide:all; line=height:0px; font-size:0px">Your preheader here</td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$app_id = "[YOUR APP ID]"; | |
$canvas_page = "[YOUR APP URL]"; | |
$auth_url = "http://www.facebook.com/dialog/oauth?client_id=" | |
. $app_id . "&redirect_uri=" . urlencode($canvas_page); | |
$signed_request = $_REQUEST["signed_request"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".icone").hover(function(){ | |
$(this).attr("src", function(index, attr){ | |
return attr.replace(".png", "_0.png"); | |
}); | |
}, function(){ | |
$(this).attr("src", function(index, attr){ | |
return attr.replace("_1.png", ".png"); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( 'taxonomy' => 'product_cat' ); | |
$terms = get_terms('product_cat', $args); | |
$count = count($terms); $i=0; | |
if ($count > 0) { | |
foreach ($terms as $term) { | |
$i++; | |
$term_list .= '<li><a href="/categoria/' . $term->slug . '" title="' . sprintf(__('View all post filed under %s', 'my_localization_domain'), $term->name) . '">' . $term->name . '</a></li>'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?<?php wp_list_categories('title_li=&depth=1'); ?> | |
NewerOlder