taina928
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Post to PDF Enhanced] Custom FieldsHi lsterling03.
Please tell me where you entered this code?$phone = get_post_meta( $post->ID, 'phone_number', true ); $html .= '<p>'.$phone.'</p>';
File and line?
Thank you so much !!
Forum: Hacks
In reply to: Query Tags From Text FormHi Mark,
you know why this code does not work on wordpress 3.1.2?<?php $search_term = get_query_var('s'); // If there's a search term if( $search_term ) { // Look for tags with a name like the search term $search_tags = get_terms( 'post_tag', array( 'fields' => 'ids', 'name__like' => '%' . like_escape( esc_sql( $search_term ) ) . '%' ) ); // If tags were found if( !is_wp_error( $search_tags ) && !empty( $search_tags ) ) { // Update the query to fetch posts that have those tags instead $args = array_merge( array( 'tag__in' => $search_tags ), $wp_query->query ); // Reset the s query var so WordPress doesn't do the regular search query $args['s'] = ''; // NOTE: You need the array merge to preserve other query parameters query_posts( $args ); } } ?>
Forum: Hacks
In reply to: Query Tags From Text FormOk, it works correctly, it’s perfect!
Thanks Mark, really THANKS! :))Forum: Hacks
In reply to: Query Tags From Text FormI want to search only the tag!
So that the search only works with thoseForum: Hacks
In reply to: Query Tags From Text FormThanks Mark,
one could not exclude the normal search for the tag and just leave?Forum: Hacks
In reply to: Query Tags From Text FormThe code you sent me work!!!
I just have to be able to remove the search in the content of the post, I need only search tagsForum: Hacks
In reply to: Query Tags From Text FormI do not look for tags, but fishing in the entire content of the post..
I’m going crazy ;(
Maybe there is something else wrong …
How do I show the whole page?Thanks again
Forum: Hacks
In reply to: Query Tags From Text FormOr would you know you suggest a method to search only in the tags?
Forum: Hacks
In reply to: Query Tags From Text FormThanks for the help Mark,
but I can not figure out where I enter the code that I’ve posted. I attach the code I used to run my search page. “VST1″is replaced by “s”. Anyway it works perfectly and I can only do research just like I wanted to tag, the only problem is paging.<form method="get" action="<?php bloginfo('url'); ?>/"><input type="text" size="20" class="search-field-teaser" name="s" id="s" value="" onfocus="if(this.value == '') {this.value = '';}" onblur="if (this.value == '') {this.value = '';}"/> <button type="submit" value="Search" class="search-go fancy_button"><span>Cerca</span></button></p> </form> <?php $tgs = array(); $tgs[] = get_query_var('s'); $tags = implode(",",$tgs); query_posts('tag='.$tags); ?>
Thanks again for your patience..
Forum: Hacks
In reply to: Query Tags From Text Formnothing, I always return the same result
Forum: Hacks
In reply to: Query Tags From Text FormHi Mark,
I use ‘VST1’ will use only because I need only a search string!Forum: Hacks
In reply to: Query Tags From Text Form// Args as array $args = array( 'tag__in' => array( get_query_var('VST1') ) ); // Merge args with existings args $args = array_merge( $args, $wp_query->query ); // Pass args into query query_posts( $args ); ?>
Forum: Hacks
In reply to: Query Tags From Text FormYes I tried, but no longer even the tag ..
Forum: Hacks
In reply to: Query Tags From Text FormThe result of the first page of this research is:
https://www.artofweb.it/help/1.jpgThe second this:
https://www.artofweb.it/help/2.jpgas you can see nothing changes..
Forum: Hacks
In reply to: Query Tags From Text FormThanks Mark…
the code that I’ve used is:<?php $tgs = array(); $tgs[] = get_query_var('VST1'); $tags = implode(",",$tgs); query_posts('tag='.$tags); ?>
and it works fine but the pagination does not work, if I click on the second page I see the rest of the post but always those of the first page.
excuse my English but I’m Italian ??