How do I define post titles as images using Custom Fields?
That’s a very old tutorial. Since version 2.9, WP comes with post thumbnails built in: http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/
That’s a very old tutorial. Since version 2.9, WP comes with post thumbnails built in: http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/
Within your main post loop you would add something like, get_post_meta($post->ID, ‘property_feature’, true); A basic example of what your main loop might look like ( it depends on your theme) to include a title and your custom field. //start the loop <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> //add … Read more
If you’d try to do this, you’d end up with querying a maybe pretty big load of data, which should be avoided. Best would be to pre-collect the data in some global (array) $prefix_meta_box_values and use this later for front-end output. You could also populate some array on save_post hook. Simply grap the values with … Read more
Your looking for custom meta fields, which you can style anyway you want using CSS. http://codex.wordpress.org/Custom_Fields You would either have to write your own functions to accomplish this or use one of the many custom fields plugins, I would recommend the WPAlchemy MetaBox.
Since version 3.1 WP got much enhanced querying of custom fields. If I got the code right your query should be something like this: query_posts(array( ‘category__and’ => array(1,2,3), ‘meta_query’ => array( array( ‘key’ => ‘length’, ‘value’ => array($min_length, $max_length), ‘compare’ => ‘BETWEEN’, ‘type’ => ‘NUMERIC’, ), ), )); See: Function Reference/WP Query > Custom Field … Read more
Sorry but it’s not clear what you want to do. From what I understand is you simply want to use an elseif statement: <?php $pageNumbered=get_post_meta($post->ID, ‘page-number’, true); ?> <?php if ( $pageNumbered ) : ?> <div class=”page-number left”> <?php echo get_post_meta($post->ID, “page-number”, true); ?> </div> <?php elseif($pageNumbered == “Z”) : ?> <div class=”page-number left”> <?php … Read more
This is a hard one but I think this will work. Someone please correct me if I’m wrong. This uses the external Simple Pie library built into WordPress to fetch the feed, get the image url and create a new post for each item and save the image url as a custom field. To activate … Read more
If you want all posts that have ReleasedProject AND PermanentArtist both set to true, you need to change the value keys for both of those to ‘true’. If you want to exclude all posts that have both of those set to ‘false’, you need to add ‘compare’ => ‘!=’ to both meta query arrays. EDIT … Read more
You need to use the meta_query parameter of the WP_Class when running a query. Something like this should point you in the right direction. $data = date(“Y-m-d”); $args = array( ‘post_type’ => ‘jogos’, ‘meta_query’ => array( array( ‘key’ => ‘data_de_lancamento’, ‘value’ => $data, ‘compare’ => ‘<=’ ) ), ‘meta_key’ => ‘views’, ‘orderby’ => ‘meta_value’, ‘order’ … Read more
The way advanced custom field plugin handles checkboxes is in an array so you work with that array, for example if you field name is categories and you want to see if web (on of the checkboxes) was check you can use: <?php if(in_array(‘web’, get_field(‘categories’) )): ?> <h1>Web was ticked!</h1> <?php endif; ?> To answer … Read more