driano
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: $wpdb->get_col with multiple tablesThanks for all!! ?? i think it will be work!
Forum: Fixing WordPress
In reply to: $wpdb->get_col with multiple tablesI need to get all ids from posts in these conditions: custom post type + taxonomy term + sticky and return in $sticky_posts
The code is wright but i will need to do a loop to get all ids and save in array. To use in my next query for example that have:
‘post__in’=> $sticky_posts
or
‘post__not_in’=>$sticky_postsThe code:
$sticky_IDs = $wpdb->get_col(“SELECT ID from “.$wpdb->prefix.”posts WHERE post_type = ‘hoteis'”); (need a modification)
$sticky_posts = array_intersect(get_option(‘sticky_posts’),$sticky_IDs);get me the ids without make a loop… but i can use the code that you make and a loop to return…
but thats ok ??
Forum: Fixing WordPress
In reply to: $wpdb->get_col with multiple tablesHi!! Thanks for the support! I modify the code:
$args = array( 'posts_per_page' => -1, 'orderby' => 'ASC', 'post_type' => 'Hoteis', 'localhotel' => 'juiz de fora', 'post_status' => 'publish', 'post__in'=> get_option( 'sticky_posts' ), ); $post_ids = get_posts( $args );
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
that works, but i will need to make a loop to get all the ids…
And if i use $wpdb->get_col, im get the ids using this:
$sticky_IDs = $wpdb->get_col(“SELECT ID from “.$wpdb->prefix.”posts WHERE post_type = ‘hoteis'”);
$sticky_posts = array_intersect(get_option(‘sticky_posts’),$sticky_IDs);You know how make the query works using $wpdb->get_col? I know that i need to combine other table with wp_posts, but i dont know how, if is inner join…
Forum: Plugins
In reply to: [WP-PageNavi] 2 Queries working with the same paginationResolved!
i do this https://pastebin.com/wEu5zRKT and works now the pagination with 2 queries ??
Forum: Fixing WordPress
In reply to: Show first in loop the posts from a specific taxonomyThis is the same thing to change the order of a post type, i put the firsts with 0 and others 1.
But i need to have all the posts in a rand mode.
The premiums will display first and random , and after the others posts in random.:/
Forum: Fixing WordPress
In reply to: Show first in loop the posts from a specific taxonomyI need to have control with what is showing! If i have 2 taxonomy terms, and all posts from one must show first than other , and the 2 taxonomy must be showing first than others posts.
And all must be working with the pagination…
Forum: Fixing WordPress
In reply to: Media Library Blank (Empty)Orin is the same problem! But here, i can send the images! I cant see the thumbs in media gallery like your first screenshot…
Forum: Plugins
In reply to: [User Access Manager] [Plugin: User Access Manager] [LOGIN_FORM]for me, doesn’t show too! =/
Forum: Plugins
In reply to: NextGen Gallery – WPMU – Gallery Folder Issuei need a solution too! =/
Forum: Fixing WordPress
In reply to: [Plugin: Thumbnail For Excerpts] View thumb in rss?this work automatic =) sorry!
Forum: Fixing WordPress
In reply to: [Plugin: Thumbnail For Excerpts] Not work’n in WPMUNow working!
Forum: Fixing WordPress
In reply to: Published date not showing up on my RSS feed page.In this case show de date…
https://www.asianhairandbeauty.com/feed/rss2/=)