Author custom fields post meta, the code?
get_the_author_meta() != get_user_meta(). Change to: echo get_the_author_meta(‘address’, $thisauthorID);
get_the_author_meta() != get_user_meta(). Change to: echo get_the_author_meta(‘address’, $thisauthorID);
You can use the “orderby” parameter of query_posts. You must specify your custom field and you must give it a numeric value. Short example: query_posts($query_string . “&cat=$que&orderby=meta_value_num&meta_key=your_custom_field”)
You can use meta_query to get only posts with display_submenuexpositions = true and order them by order_submenuexpositions. $args = array( ‘orderby’ => ‘meta_value’, ‘meta_key’ => ‘order_submenuexpositions’, ‘meta_query’ => array( array( ‘key’ => ‘display_submenuexpositions’, ‘value’ => ‘true’, ‘compare’ => ‘LIKE’ ) ) ); $query_posts( $args );
This Plugin is loading quite a lot of scripts: wp_enqueue_script( ‘jquery’ ); wp_enqueue_script( ‘jquery-form’ ); wp_enqueue_script( ‘date’, “https://wordpress.stackexchange.com/” . PLUGINDIR . “https://wordpress.stackexchange.com/” . $plugin_dir . ‘/js/date.js’, array(‘jquery’) ); wp_enqueue_script( ‘bgiframe’, “https://wordpress.stackexchange.com/” . PLUGINDIR . “https://wordpress.stackexchange.com/” . $plugin_dir . ‘/js/jquery.bgiframe.js’, array(‘jquery’) ) ; wp_enqueue_script( ‘datePicker’, “https://wordpress.stackexchange.com/” . PLUGINDIR . “https://wordpress.stackexchange.com/” . $plugin_dir . ‘/js/jquery.datePicker.js’, array(‘jquery’) ); … Read more
It seems that it still exists, you just have to enable showing it, with screen options http://theandystratton.com/2011/wordpress-3-1-admin-bar-and-i-cant-see-custom-fields
you can do that with hooking a simple function to save_post hook add_action(‘save_post’,’my_rating_field’); function my_rating_field($post_id){ global $post; // verify if this is an auto save routine. // If it is our form has not been submitted, so we dont want to do anything if ( defined( ‘DOING_AUTOSAVE’ ) && DOING_AUTOSAVE ) return; // verify this … Read more
Why not? Same custom field parameters in query should apply and you can use post_type argument to limit query to pages alone.
How about: $thumb = get_post_meta( $post_id, ‘thumb’, true ); $url = get_post_meta( $post_id, ‘website’, true); echo “<a href=”https://wordpress.stackexchange.com/questions/24970/$url”><img src=”$thumb” /></a>”; The get_post_meta() function is ideal when you know ahead-of-time the names of the fields you want to retrieve. Setting the third parameter to true tells it that you want to return a single value, and … Read more
I found this: http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query I have modified the date to retrieve the last 15 days. It’s untested, but should work. $expireDays=”15″; $querystr = ” SELECT $wpdb->posts.* FROM $wpdb->posts, $wpdb->postmeta WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id AND $wpdb->posts.post_status=”publish” AND $wpdb->posts.post_type=”post” AND $wpdb->posts.post_date >= ( CURDATE() – INTERVAL $expireDays DAY ) ORDER BY $wpdb->posts.post_date DESC “; $pageposts = $wpdb->get_results($querystr, … Read more
Custom fields for custom taxonomies are nothing more than custom templates. For example, you can remove the template of the post_tag taxonomy via remove_meta_box() function and add custom template via add_meta_box() function. Examples Remove tags template: /* Remove default post tags template. */ add_action( ‘admin_menu’ , ‘example_remove_taxonomy_template’ ); /** * Remove taxonomy template * * … Read more