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
// Add the filter | |
add_filter( 'template_include', 'my_custom_template'); | |
/** | |
* Returns customized templates for custom taxonomies | |
* | |
* @param string $template | |
* @return string | |
*/ | |
function my_custom_template ( $template ) { |
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 dropdown_taxonomy ( $taxonomy, $all_option = 'todo') { | |
$terms = get_terms ( $taxonomy ); | |
?> | |
<!-- START taxonomy Search --> | |
<select name="<?php echo $taxonomy ?>"> | |
<option value=''><?php echo $all_option ?></option> | |
<?php foreach($terms as $term): ?> | |
<option value="<?php echo $term->name ;?>" <?php selected(get_query_var($taxonomy), $term->name, true) ?>> | |
<?php echo $term->name ?> |
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 class="share-buttons"> | |
<li>¿Te ha gustado? Compártelo!</li> | |
<li><a href="javascript: return false;" onclick="window.open('http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php echo urlencode(get_the_title()) ?>','window','width=550,height=400')" class="btn btn-small"><i class="facebook"></i> Facebook</a></li> | |
<li><a href="javascript: return false;" onclick="window.open('https://twitter.com/share?url=<?php the_permalink();?>&text=<?php echo get_the_title() ?>&via=cuidadoinfantil','window','width=550,height=400')" class="btn btn-small"><i class="twitter"></i> Twitter</a></li> | |
<li><a href="javascript: return false;" onclick="window.open('https://plus.google.com/share?url=<?php the_permalink();?>','window','width=450,height=430')" class="btn btn-small"><i class="google"></i> Google+</a></li> | |
<? /* <li><a href="javascript: return false;" onclick="window.open('https://www.linkedin.com/cws/share?url=<?php the_permalink();?>&title=<?php echo urlencode(get_the_title())?>&original_referer=<?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
function bp_component_screen_controller() { | |
global $bp; | |
//Are we in the current type | |
if ( $bp->current_component == BP_YOUR_COMPONENT_SLUG ) { | |
// The directory. | |
if ( (empty( $bp->current_action ) || ($bp->current_action == 'page')) && | |
(empty( $bp->action_variables ) || is_numeric($bp->action_variables[0]))) { |
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
// Calendar icon | |
//------------------------// | |
.calendar-icon { | |
// Contenedor principal | |
display: inline; | |
float: left; | |
height: 14px; | |
margin: 6px 3px 0 0; | |
position: relative; |
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 remove_wp_login_styles () { | |
add_filter( 'style_loader_tag', '__return_null' ); | |
} | |
add_action( 'login_init', 'remove_wp_login_styles'); |
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
add_action('wpcf7_before_send_mail', 'cf7_create_post', 10, 1); | |
function cf7_create_post( $data ) { | |
extract($data->posted_data); | |
$post_id = wp_insert_post( array( | |
'post_status' => 'draft', | |
'post_title' => $nombre, | |
'post_content' => $consulta |
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
/*********************************************************************************** | |
* 2. FILTRO POR PRODUCTOS EN PEDIDOS | |
***********************************************************************************/ | |
define('FILTRO_PRODUCT_NAME', 'filtro_producto'); | |
define('ORDER_POST_TYPE', 'shop_order'); | |
/** | |
* Añade la query de las sedes | |
* Hook 'pre_get_posts' |
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 bulk_insert_buddypress_fields ( $group_id, $parent_id, $type ) { | |
$fields = | |
"Afganistán | |
Albania | |
Alemania | |
Andorra | |
Angola | |
Anguilla | |
Antártida | |
Antigua y Barbuda |
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
/** | |
* Removes facebook avatar URL save in user metas by wp fb autoconnect plugin | |
* requires Buddypress & wp-fb-autoconnect | |
* @global type $bp | |
*/ | |
function remove_facebook_avatar () { | |
global $bp; | |
delete_user_meta($bp->displayed_user->id, 'facebook_avatar_full'); | |
delete_user_meta($bp->displayed_user->id, 'facebook_avatar_thumb'); | |
} |
OlderNewer