Ordering Custom WP_Query loop by meta key value with pagination
Ordering Custom WP_Query loop by meta key value with pagination
Ordering Custom WP_Query loop by meta key value with pagination
Showing certain page without redirection
You are referring to the metaboxes on the admin post screen right? For that you don’t need a plugin, just drop the following into your functions.php file. // add_action(‘user_register’, ‘set_user_metaboxes’); add_action(‘admin_init’, ‘set_user_metaboxes’); function set_user_metaboxes($user_id=NULL) { // These are the metakeys we will need to update $meta_key[‘order’] = ‘meta-box-order_post’; $meta_key[‘hidden’] = ‘metaboxhidden_post’; // So this can … Read more
I solved id by myself. For those who want do the same trick: go to bliss-facebook-likebox plugin folder, edit cool-fb-likebox.php. Near the bottom of file there will be an $url variable. Change: $url = urlencode($get_cfbl_options[‘fbpageurl’]); to: wp_reset_query(); global $post; $site-id = 1; // use your own needed number if( is_page($site-id) || $post->post_parent == ‘.$site-id.’) { … Read more
I think all you need is this: <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> if (get_field(‘channel’) == ‘Youtube’) { echo get_field(‘youtube_video_id’); } elseif (get_field(‘channel’) == ‘Vimeo’) { echo get_field(‘vimeo_video_id’); } elseif ( has_post_thumbnail()) { the_post_thumbnail(); } That should use a Youtube video, then a Vimeo video, then the thumbnail, … Read more
Sort users by custom user meta value
There are only a few reliable filters for front end content, the_content being the only one that seems reasonably applicable. With that you can insert content in the post body. There are also actions like template_redirect and template_include but I doubt those execute where you want them to and using them could be tricky anyway. … Read more
This can be done a lot easier. It is just necessary to change the permalinks settings accordingly – as mentioned on github at the issue 3145: Meet this criteria: // If permalinks contain the shop page in the URI prepend the breadcrumb with shop if ( $shop_page_id && strstr( $permalinks[‘product_base’], “https://wordpress.stackexchange.com/” . $shop_page->post_name ) && … Read more
I think this is what you’re looking for: $$arr_name = array(); If $arr_name = ‘post_title’, then the above would mean: $post_title = array();
You need ‘order_by’ => ‘post__in’ in the last query in order to “Preserve post ID order given in the post__in array (available with Version 3.5).”. I don’t know if the order you are passing in is the order you want after the array_merge( $group_1, $group_2). In other words, you need to feed that second query … Read more