Re: Classipress for Tutor Site
It's pretty easy to do actually. Just create a new custom field like the article above explains like so.
1) Go to any ad you have and edit it.
2) Scroll down to the custom fields section and click on the "Enter new" link. Create a new custom field called "color_option".
3) Put a value in for this custom field like "blue".
4) Click the "Add Custom Field" button.
5) Save your ad.
6) Now we'll need to write some code to display this on the actual ad page.
[attachment=1:lqer4sbl]custom-field.gif[/attachment:lqer4sbl]
Just paste in the following line of code on single.php within the
WP loop:
Code:
<?php _e('Color','cp'); ?>: <?php echo get_post_meta($post->ID, "color_option", true); ?>
That will print out the custom field value if it exists.
Assuming you did this correctly you'll then see something like "
Color: blue" on that ad.
If you want to add a value for other ads, you'll need to edit each ad and instead of creating a new custom field each time, you'll just select the "Color_Option" value from the dropdown and then just type in a new value (blue, green, red, etc).
[attachment=0:lqer4sbl]custom-field2.gif[/attachment:lqer4sbl]