Skip to content

Instantly share code, notes, and snippets.

View Dinamiko's full-sized avatar
💭
just coding stuff

Emili Castells Dinamiko

💭
just coding stuff
View GitHub Profile
<div class="docu-item <?php echo $col;?>">
<div class="docu-item <?php echo $col;?> tf-custom-item">
.docu-item.tf-custom-item {
width:100%;
padding-left: 5%;
padding-right: 5%;
padding-top: 0;
padding-bottom: 0;
background:#3070d1;
color:#FFF;
}
the_content( sprintf(
__( 'Continue reading %s', 'twentyfifteen' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
) );
the_excerpt();
function custom_dequeue_scripts() {
wp_dequeue_script( 'masonry' );
}
add_action( 'wp_print_scripts', 'custom_dequeue_scripts', 100 );
/**
* Modifica argumentos de WP_Query
*/
add_filter( 'ep_args', 'custom_ep_args' );
function custom_ep_args( $args ) {
$args['posts_per_page'] = 10;
$args['order'] = 'ASC';
$args['orderby'] = 'author';
return $args;
/**
* Añade contenido antes de la lista
*/
add_action( 'ep_before_list', 'custom_ep_before_list' );
function custom_ep_before_list() { ?>
<h3><?php _e('Últimas entradas', 'text-domain');?></h3>
<?php }
/**
* Añade contenido después de la lista
*/
add_action( 'ep_after_list', 'custom_ep_after_list' );
function custom_ep_after_list() { ?>
<p><?php _e('Última modificación: ', 'text-domain') . the_modified_date( 'd-m-Y g:i a' );?></p>
<?php }
/**
* Obtiene el id del attachment a partir del id de la categoría
* @param string taxonomy name
* @param int term id
* @return int attachment id
*/
function ic_get_attachment_id( $taxonomy = 'category', $term_id ) {
$args = array(
'post_type' => 'attachment',