View gist:5176eb63d858cd22d5b5
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
//Simple WPQuery filter by category Slug | |
<?php | |
wp_reset_postdata(); | |
$args = array( | |
'category_name' => 'actualidad', | |
'orderby' => 'date', | |
'post_type' => 'post', | |
'posts_per_page' => -1 | |
); |
View gist:0696634db085c3dcb4c7
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
$total = $the_query->max_num_pages; | |
// only bother with the rest if we have more than 1 page! | |
if ( $total > 1 ) { | |
// get the current page | |
if ( !$current_page = get_query_var('paged') ) | |
$current_page = 1; | |
// structure of "format" depends on whether we're using pretty permalinks | |
if( get_option('permalink_structure') ) { | |
$format = '?paged=%#%'; | |
} else { |
View gist:3ccbb7c9e7c7a1c21787
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 class="post-resume"> | |
<?php | |
$my_postid = get_the_ID();//This is page id or post id | |
$content_post = get_post($my_postid); | |
$content = $content_post->post_content; | |
$content = apply_filters('the_content', $content); | |
$content = str_replace(']]>', ']]>', $content); | |
echo wp_trim_words( $content, 40, '<a href="'. get_permalink() .'"> ...Read More</a>' ); | |
?> |
View PhoneNumberUtil.php
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 | |
namespace libphonenumber; | |
/** | |
* Utility for international phone numbers. Functionality includes formatting, parsing and | |
* validation. | |
* | |
* <p>If you use this library, and want to be notified about important changes, please sign up to | |
* our <a href="http://groups.google.com/group/libphonenumber-discuss/about">mailing list</a>. |