Yogui Bear
Forum Replies Created
-
I’ve found a solution, I saw a thread in Stack overflow about the same issue, to fix it, just add these lines to the child theme style.css and this did the trick.
.gm-style img { max-width: none !important; } .gm-style label { width: auto; display: inline !important; }Forum: Fixing WordPress
In reply to: How can I get a taxonomy by custom post type fieldswe are almost there, I’ve been searching at the codex site and found this
<?php $taxonomy = 'category'; // get the term IDs assigned to post. $post_terms = wp_get_object_terms( $post->ID, $taxonomy, array( 'fields' => 'ids' ) ); // separator between links $separator = ', '; if ( !empty( $post_terms ) && !is_wp_error( $post_terms ) ) { $term_ids = implode( ',' , $post_terms ); $terms = wp_list_categories( 'title_li=&style=none&echo=0&taxonomy=' . $taxonomy . '&include=' . $term_ids ); $terms = rtrim( trim( str_replace( '<br />', $separator, $terms ) ), $separator ); // display post categories echo $terms; } ?>That code above is actually doing what I want to , is getting me the taxonomies Assigned to that post, I’ve tested it by placing below the comment “The loop”
Forum: Fixing WordPress
In reply to: How can I get a taxonomy by custom post type fieldsI got confused, where do you suggest to add your code?
this is my code.
<?php get_header(); /* * GM Template name: Property 4-col Pre construct */ ?> <?php if(have_posts()) : ?> <?php while(have_posts()) : the_post(); ?> <?php $skt_port_filter_hide = sketch_get_option($advertica_shortname.'_hide_pro_filter'); $pagetitle = get_post_meta($post->ID, "_skt_pagetitle_metabox", true); $pagetitle = ((isset($pagetitle) && $pagetitle !="") ? $pagetitle : '1' ); ?> <?php if($pagetitle == 1) { ?> <div class="bread-title-holder"> <div class="bread-title-bg-image full-bg-breadimage-fixed"></div> <div class="container"> <div class="row-fluid"> <div class="container_inner clearfix"> <h1 class="title"> <?php the_title(); ?> </h1> <?php if(sketch_get_option($advertica_shortname."_hide_bread") == 'true') { if ((class_exists('advertica_breadcrumb_class'))) {$advertica_breadcumb->custom_breadcrumb();} } ?> </div> </div> </div> </div> <?php } ?> <!-- #Container Area --> <div id="container" class="clearfix"> <div class="container post-wrap"> <div class="row-fluid"> <!-- Content --> <div id="content" class="span12"> <div class="post project-temp4" id="post-<?php the_ID(); ?>" > <!-- Project Wrap --> <div class="project_wrap clearfix"> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?> <?php $args = array( 'post_type' => 'property', 'posts_per_page' => -1 , 'meta_key' => 'property_type', 'meta_value' => 'floorplan', 'paged' => $paged); query_posts($args); $args = array( 'taxonomy' => 'property_location' ); $data_type = null; //For display data-type class $data_id = 0; //For display data-id class ?> <div id="wrap" class="clearfix"> <?php if($skt_port_filter_hide == "true") { ?> <div class="style-filter"> <!-- Category Filter --> <dl class="group maingroup"> <dt></dt> <dd> <ul class="filter group" id="isofilters"> <li><a href="JavaScript:void(0);" data-filter="*" class="selected"><?php _e('ver todas','advertica'); ?></a></li> <?php $locations=get_categories($args); foreach ($locations as $category) { $loc_name=$category->name; $loc_slug=$category->slug; ?> <li><a href="JavaScript:void(0);" data-filter="<?php echo $loc_slug; ?>"><?php echo $loc_name; ?></a></li> <?php } ?> </ul> </dd> </dl> <!-- Category Filter --> </div> <!-- style-filter --> <?php } ?> <div id="container-isotop" class="portfolio group four-col"> <?php // The Loop while ( have_posts() ) : the_post(); $terms = get_the_terms( $post->ID, 'property_location' ); $loc_links = array(); foreach ( $terms as $term ) { $loc_links[] = $term->slug; } foreach($loc_links as $itm){ $data_type .= $itm.' '; } $data_id++; ?> <!-- Project Box --> <div class="item project_box span3 <?php echo $data_type;$data_type =null; ?>" data-type="<?php echo $data_type;$data_type =null; ?>" data-id="id-<?php echo $data_id; ?>"> <!-- standard --> <div class="project-item" id="post-<?php the_ID(); ?>"> <?php if(has_post_thumbnail()) { $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'advertica_portfolio_image' ); $pretty_thumb = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID),'full'); ?> <div class="feature_image" style="position: relative;"> <img class="skin-border" src="<?php echo $image[0]; ?>" alt="Thumbnail" /> </div> <div class="title"> <a href="<?php the_permalink();?>" title="<?php the_title();?>"> <?php the_title();?> </a> </div> <div class="mask"> <?php $custom_fields = get_post_custom(); $my_custom_field = $custom_fields['property_type']; foreach ($my_custom_field as $key => $value) { //echo $key . " => " . $value . "<br />"; if ($value == "floorplan"){ echo "<div class='ribbon-wrapper-xl'><div class='ribbon-green-large'>Pre Construcción</div></div>"; } } ?> <a data-rel="prettyPhoto" class="icon-image folio" href="<?php echo $pretty_thumb[0]; ?>"></a> </div> <?php } ?> </div> <!-- standard --> </div> <!-- Project Box --> <?php endwhile; // Reset Query ?> </div> <div class="clearfix"></div> <?php wp_reset_query(); ?> </div> </div> <!-- Project Wrap --> </div> <?php endwhile; ?> <?php else : ?> <div class="post"> <h2><?php _e('Not Found','advertica'); ?></h2> </div> <?php endif; ?> </div> <!-- Content --> </div> </div> </div> <!-- #Container Area --> <?php get_footer(); ?>Forum: Fixing WordPress
In reply to: How can I get a taxonomy by custom post type fieldsI think is not about the isotope jquery, ia about what values you pass trough the for each loop, there’s got to be a way to get or query by a custon post field.
Forum: Fixing WordPress
In reply to: How can I get a taxonomy by custom post type fieldsThank you so much for your time, Have a wonderful day.
Forum: Fixing WordPress
In reply to: How can I get a taxonomy by custom post type fieldshttp://www.lilianamartinezrealtor.com/zonas-de-inversion/ this is without the changes that I want to add, you will see all properties and all locations, are the red buttons the isotope thing?
Forum: Fixing WordPress
In reply to: How can I get a taxonomy by custom post type fieldsForum: Fixing WordPress
In reply to: How can I get a taxonomy by custom post type fieldsYes, I’ve done that with the main loop, actually I’m getting propety post types with floorplan value.
<div class="project_wrap clearfix"> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?> <?php $args = array( 'post_type' => 'property', 'posts_per_page' => -1 , 'meta_key' => 'property_type', 'meta_value' => 'floorplan', 'paged' => $paged); query_posts($args); $args = array( 'taxonomy' => 'property_location' ); $data_type = null; //For display data-type class $data_id = 0; //For display data-id class ?> <div id="wrap" class="cThis code is below of the “for each” mentioned in the previous entry, and is actually getting the floorplan entries.
Forum: Fixing WordPress
In reply to: How can I get a taxonomy by custom post type fieldsThe posts by taxonomy term + custom field, actually is getting all existing taxonomies.
Just the titles or “labels”, the attributes I’ve already created them in Spanish.