Pass Custom Field Into XML Array? Possible?
-
Hi guys and gals,
so i’m stuck and need some help. I want to use a custom field to pass the value of it into an xml array.
example:
here’s the custom field snippet i normally use to make it show up on wordpress.
<?php echo get_post_meta($post->ID, "customfieldA",true); ?>
and then here’s the xml i want it to be passed into.
$categories[] = array( 'name' => 'DVD Player', 'search_options' => array( 'keywords' => 'cheap dvd player' ) );
So i want to replace “cheap dvd player” with my custom field “customfieldA”.
some other notes:
i have the XML code on my post template page. So i want to when adding/edting posts, to just insert a keyword into the custom field for that particular post.Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Pass Custom Field Into XML Array? Possible?’ is closed to new replies.