maara
Forum Replies Created
-
Forum: Hacks
In reply to: difference between get_post_custom and get_post_custom_values and get_post_metaor is it better to use
get_template_directory_uri();
?Forum: Hacks
In reply to: difference between get_post_custom and get_post_custom_values and get_post_metajust to be sure that i have found a decent solution, here is how i have solved my icon/image problem
echo '<img src="'; echo get_bloginfo('template_directory'); echo '/images/tick.png'; echo '" />';
or maybe there is another and better way?
Forum: Hacks
In reply to: difference between get_post_custom and get_post_custom_values and get_post_metain fact, icons/images solved, but still wondering how to show unchecked boxes and how to have a good display order… it’s really exciting learning php and wordpress… thanks again!!
Forum: Hacks
In reply to: difference between get_post_custom and get_post_custom_values and get_post_metain fact, instead of echoing
get_post_meta($post->ID, 'feat_elevator', true);
just echo ‘yes’ , but i’m still struggling trying to replace it with an icon….Forum: Hacks
In reply to: difference between get_post_custom and get_post_custom_values and get_post_metakhhm, not really clear to me.. i’ve been dealing with custom fields and custom meta boxes for several days only trying to build a very simple and static availibility calendar for a property as a custom post type using custom fields and multicheck boxes (if available on a certain day, the checkbox is checked), etc.
what i am trying is to show/display all values of a custom field key, like :
<?php $ac_january_values = get_post_custom_values('ac_january'); foreach ( $ac_january_values as $key => $value ) { echo "$value "; } ?>
but i am getting those values in a reverse/bad order, like : 02 01 05 , etc. How to re-order those values so to make them show as 01 02 03 04 05, etc. and how to display even ‘unchecked’ boxes??
Another thing:
using<?php // elevator if ( get_post_meta($post->ID, 'feat_elevator', true) ) : echo 'Elevator:'; echo get_post_meta($post->ID, 'feat_elevator', true); else : echo 'Elevator:'; echo 'No'; endif; ?>
i am getting, when checked:
Elevator: onHow to change that ON to YES or even better – how to make it be displayed as an icon or an image instead ??
Thanks so much!!