Timeline for Automatically assign a custom post to a custom taxonomy based on custom field value
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 13, 2017 at 12:37 | history | edited | CommunityBot |
replaced http://wordpress.stackexchange.com/ with https://wordpress.stackexchange.com/
|
|
Jul 5, 2012 at 22:00 | comment | added | KingLiNoodles |
Also, I get the correct value echoed if I use this on the page: <?php echo (get_post_meta($post->ID, 'zip', true)) ?> . I just can't get the value to work properly as a variable in the function.
|
|
Jul 5, 2012 at 10:58 | comment | added | KingLiNoodles |
I've used var_dump in the template, and it's shown a value for the custom field: ["zip"]=> array(1) { [0]=> string(5) "10001" .
|
|
Jul 4, 2012 at 14:04 | comment | added | KingLiNoodles |
toscho, you've been so helpful in this. I really appreciate it, thank you! Unfortunately I'm not sure where exactly to use var_dump here.. For reference, here's the plugin as it stands now (which isn't working yet, but when $zip was post_title it worked perfectly from the title - I just need to replace the title with my custom field): pastebin.com/Fhsi9gfx . Any thoughts would be very helpful!
|
|
Jul 4, 2012 at 12:28 | comment | added | fuxia♦ |
var_dump( get_post_custom( $post->ID ) ); to see if there is a value.
|
|
Jul 4, 2012 at 12:26 | comment | added | KingLiNoodles |
Any idea where I'm going wrong with $customField = get_post_meta($post->ID,'zip',true); ? Thanks!
|
|
Jun 21, 2012 at 13:25 | comment | added | KingLiNoodles |
Wow fantastic! It's now working from the post_title but I can't get it working from the zip . I've added $customField = get_post_meta($post->ID,'zip',true); to the beginning, and replaced all post_title instances with $customField . When I update the post it says Cannot access empty property . Any idea how to use the custom field here? Thanks!
|
|
Jun 21, 2012 at 12:16 | history | answered | fuxia♦ | CC BY-SA 3.0 |