display specific custom fields
You should use get_post_meta() twice (Ref to your other question): <?php echo get_post_meta( get_the_ID(), ‘club’, true ); echo ‘<br />’; echo get_post_meta( get_the_ID(), ‘date’, true ); ?>
You should use get_post_meta() twice (Ref to your other question): <?php echo get_post_meta( get_the_ID(), ‘club’, true ); echo ‘<br />’; echo get_post_meta( get_the_ID(), ‘date’, true ); ?>
Okay, based on answers on link above (where I got the old code and there are people that help to answered), I put the modification code for my website. I tried it and it’s working like charm. Change: add_action( ‘woocommerce_product_after_variable_attributes’, ‘variable_fields’, 10, 2 ); Into : add_action( ‘woocommerce_variation_options’, ‘variable_fields’, 10, 3 ); And change : … Read more
Firstly you’ll need to stop storing the dates in D d.m format, the queries aren’t going to be able to sort based on that data. As wyrfel pointed out, you’ll need to use the alternate field option to have two fields, one that shows the pretty(or your chosen) date format, and another that holds the … Read more
There’s a limit set inside the function that lists the meta data. http://core.trac.wordpress.org/browser/tags/3.1/wp-admin/includes/template.php#L512 Run a filter on postmeta_form_limit to increase to your desired value, eg. add_filter( ‘postmeta_form_limit’, ‘meta_limit_increase’ ); function meta_limit_increase( $limit ) { return 50; } Hope that helps.. 🙂
There is no WordPress way to add fields between user’s bio and password, but as you said your self you can do it the javascript way. Below is the code that adds single field to give you an example on how you can achieve the same. NOTE: The code below only display the fields but … Read more
Try this code: $args = array( ‘posts_per_page’ => ’10’, ‘post_type’ => ‘programmes’, ‘meta_key’ => ‘popularityfig’, ‘meta_value’ => ”, ‘meta_compare’ => ‘!=’, ‘order’ => ‘DESC’ ); There’re 2 arguments you might want to note in the code: meta_value and meta_compare. Using meta_compare with operator != will exclude posts with empty meta value.
As an alternative to my other answer, you can also use the get_avatar filter. Props to Sumit to alerting me to this one. The benefit of using the get_avatar filter is your custom avatar should be applied anywhere WordPress uses it, rather than just in this users list like my other answer deals with. If … Read more
extend Meta Box / Document Panel
Well you can just use the WordPress loop with a custom query to throw all the data you need into arrays. For example if you want all the post titles in an array (using get_posts); $all_posts = get_posts(‘numberposts=-1’); $all_titles = array(); foreach( $all_posts as $all_post ) { $all_titles[] = $all_post->post_title; } As for using the … Read more
The fileurl should look like this: fileurl = $(‘a’, html).attr(‘href’); It’s a pretty simple fix. I would do some validation on this: if(/\.mp3\b/.test(fileurl)){ //Do something awesome }else{ alert(‘The file you selected is not an MP3.’); } Cheers!