<input type=’hidden’ name=’lang’ value=’es’ /> <?php do_action( ‘wpml_add_language_form_field’ ); ?> //add this to the searchform.php
1.- Install Simple Google Maps Shortcode 2.- add filter to enter variable in shortcode 3.- example use (with acf input) $address = ‘[pw_map address=»‘; $address .= get_field(‘direccion’); $address .= ‘»…
//function.php function the_content_filter( $content) { return do_shortcode( $content);} add_filter( ‘the_content’, ‘the_content_filter’, 1000); the just use it//example echo do_shortcode($variable);
<?php while ( $custom_query->have_posts() ) : $custom_query->the_post(); ?> <?php foreach((get_the_category()) as $category) { //si las tienes anidadas, y quieres esconder el padre puedes usar un if …
Page.php <?php get_header(); ?> <h2>Posts</h2> <?php $paged = ( get_query_var(‘paged’) ) ? get_query_var(‘paged’) : 1; $custom_args = array( ‘post_type’ => ‘post’, ‘posts_per_page’ => 2, ‘paged’ => $paged, …
$services = get_pages(‘parent=’ . $posts[0]->ID . ‘&child_of=’ . $posts[0]->ID); ?> <section class=»services-grid»> <?php foreach ($services as $service): …
$my_wp_query = new WP_Query();$all_wp_pages = $my_wp_query->query(array(‘post_type’ => ‘page’)); // Obtienes las páginas como un objeto$portfolio = get_page_by_title($title); //Debes obtener el title de la página actual antes y ponerlo acá $portfolio_children…
function content($limit,$content) { $content = explode(‘ ‘, $content, $limit); if (count($content)>=$limit) { array_pop($content); $content = implode(» «,$content).’…’; } else { $content = implode(» «,$content); } $content =…
$idObj = get_category_by_slug($post_slug); $id = $idObj->term_id; echo $id; $categories = get_categories(‘child_of=’.$id.’&hide_empty=0′); foreach ($categories as $c) { echo ‘<li>’.$c->cat_name.'</li>’;}
$url = wp_get_attachment_image_src(get_post_thumbnail_id($id), ‘thumbnail’ ); echo $url[0];
ACF: HTML: <div id=»bootstrap-touch-slider» class=»carousel bs-slider fade control-round indicators-line hidden-xs hidden-sm» data-ride=»carousel» data-pause=»hover» data-interval=»5000″ > <!– Indicators –> <ol class=»carousel-indicators»> <?php // check if the repeater…
En functions.php agrega lo siguiente: add_action( ‘admin_init’, ‘hide_editor’ );function hide_editor() { // Get the Post ID. $post_id = $_GET[‘post’] ? $_GET[‘post’] : $_POST[‘post_ID’] ; $cats = get_the_category(); $cat_name = $cats[0]->name;…
Para resolver el problema… hice la ruta desde el nombre del articulo, luego obtuve su id, desde ese id.. encontre el id de la(las) categoria a la que pertenece…. luego…
Edit file plugins/wordpress-nextgen-galleryview/GalleryView/scripts/jquery.galleryview-2.0.jsline 873 aprox. else { p = $(»); //(before: p = $(»); p.attr(«href», j_frames.eq(i).find(‘img’).eq(0).attr(‘src’)); //(include this line) …