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
//The CSS | |
.tocheck {float:left;} | |
@media only screen and (max-width: 800px){ | |
.tocheck {float:none;} | |
} |
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 | |
$prev = get_permalink(get_adjacent_post(false,'',false)); | |
$next = get_permalink(get_adjacent_post(false,'',true)); | |
?> | |
<a href="<?php echo $prev; ?>">Previous Post</a> | |
<a href="<?php echo $next; ?>">Next Post</a> | |
<?php //What if there isn’t a previous or next post? ?> |
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
@function get-vw($object_width,$window_width:1440) { | |
$vw: ($window_width * 0.01) * 1px; | |
@return ($object_width / $vw) * 1vw; | |
} | |
@function get-vh($object_height,$window_height:768) { | |
$vh: ($window_height * 0.01) * 1px; | |
@return ($object_height / $vh) * 1vh; | |
} |
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 | |
/* | |
Plugin Name: dospuntocero | |
Plugin URI: - | |
Description: lite CMS | |
Author: Francisco Arenas | |
Version: 1 | |
Author URI: http://dospuntocero.cl |
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
$masonry-css-column-gap: $global-margin; | |
$global-margin: 1rem !default; | |
.masonry-container { | |
column-count: 1; | |
column-gap: $masonry-css-column-gap; | |
@if ($flexbox-responsive-breakpoints) { | |
$i: 0; | |
@each $size in $breakpoint-classes { |
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_Query Arguments | |
$args = array( | |
'order' => 'DESC', | |
'posts_per_page' => 5 | |
); | |
// The Loop | |
$query = new WP_Query( $args ); | |
while ( $query->have_posts() ) : $query->the_post(); | |
$even_odd_class = $wp_query->current_post % 2 == 0 ? 'even' : 'odd'; |
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
function oddeven_post_class ( $classes ) { | |
global $current_class; | |
$classes[] = $current_class; | |
$current_class = ($current_class == 'odd') ? 'even' : 'odd'; | |
return $classes; | |
} | |
add_filter ( 'post_class' , 'oddeven_post_class' ); | |
global $current_class; | |
$current_class = 'odd'; |
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 | |
$recent_posts = wp_get_recent_posts(); | |
?> | |
<?php $current_class = 'odd';?> | |
<?php foreach( $recent_posts as $recent ):?> | |
<?php $current_class = ($current_class == 'odd') ? 'even' : 'odd'; ?> | |
<div class="<?php echo $current_class ?>"> | |
<?php echo $recent["post_title"]?> | |
<a href="<?php echo get_permalink($recent["ID"])?>">READ MORE</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
function hide_editor() { | |
remove_post_type_support('page', 'editor'); | |
} | |
add_action( 'admin_init', 'hide_editor' ); |
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
function get_excerpt($limit, $source = null){ | |
$excerpt = $source == "content" ? get_the_content() : get_the_excerpt(); | |
$excerpt = preg_replace(" (\[.*?\])",'',$excerpt); | |
$excerpt = strip_shortcodes($excerpt); | |
$excerpt = strip_tags($excerpt); | |
$excerpt = substr($excerpt, 0, $limit); | |
$excerpt = substr($excerpt, 0, strripos($excerpt, " ")); | |
$excerpt = trim(preg_replace( '/\s+/', ' ', $excerpt)); | |
$excerpt = $excerpt.'... <a href="'.get_permalink($post->ID).'">more</a>'; |