Assign custom fields to multiple posts?
Try magic fields plugin. That is the best custom fields plugin i’ve tried so far
Try magic fields plugin. That is the best custom fields plugin i’ve tried so far
Dynamically create check boxes for given post titles in WPAlchemy
If you want to avoid preprocessing the data, this will work (though it’s definitely the quick and dirty method): <?php while (have_posts()) : the_post(); ?> <?php $data = get_post_meta( $post->ID, ‘key’, true ); ?> <?php if( $data != ” ) : ?> <!– info –> <?php endif; ?> <?php endwhile; ?> Otherwise (and this is … Read more
I can’t test it now, but the following should work… query_posts(‘post_type=sponsors&meta_key=_vof_sponsor_level&meta_value=Gold’); if (have_posts()) : echo “<div class=”imageshadow sponsorwidgetslides”>”; while (have_posts()) : the_post(); if ( get_post_meta($post->ID, ‘url’, true) ) { ?> <a href=”https://wordpress.stackexchange.com/questions/39982/<?php echo get_post_meta($post->ID,”url’,true); ?>”><?php the_post_thumbnail(‘sponsorwidget’);?></a> <?php } else { the_post_thumbnail(‘sponsorwidget’); } endwhile; echo “</div><!–/.imageshadow–>”; echo “<a class=”widgetlink” href=””; bloginfo(“url’); echo “/sponsors’>View all Sponsors »</a>”; … Read more
Your function is going to hit the end of that first return and stop. Concatenate the strings and it should start working.
While I’m not completely sure what you’re trying to accomplish, you can use the following to programatically use a shortcode: echo do_shortcode(‘[DDET]Content goes here[/DDET]’);
how about array_reverse() http://php.net/manual/en/function.array-reverse.php there are a bunch of array manipulation functions at php.net. i’m always there looking something up. also sort() might be useful EDIT based on your comments: sort($album); print_r($album); should return: Array ( [0] => 001,Get Rich Or Die Tryin [1] => 002,Curtis [2] => 003,The Massacre [3] => 004,Before I Self … Read more
I think the way I would tackle this would be a non-hierarchical taxonomy. That would allow you to tag the artist and such as well as give you a few fields to work with for basic data input…you also have the ability to expand, should you need it. If you’re going to have a lot … Read more
you can use query_posts to sort the post by you custom field, Add this before you loop query_posts( $query_string . ‘meta_key=eventdate&order=ASC&orderby=meta_value’);
Sorry! Turns out the problem with query_posts failing here was due to my PHP memory_limit. I changed it from 8mb to 128mb and the problem goes away.