Tagged: custom post types
I’m using WP_Alchemy with custom post types and have the following problem and I’m sure it’s possible but I don’t know how.
I have a custom post type called persons. In the person post there are different meta like “job”, “title”, “name”, “telephone” and so on. I am able to get those infos on a single template to work.
Let’s say a person post has the perma ID “bruce-wayne” now.
Now I have a different page like “Superheroes”. It has some contents and so on. It has a metabox named “identify” where I want to enter which person I need to show on that page. I enter the meta “identify” with “bruce-wayne”.
So the template of the superheroes page should be like this.
$meta = $mb_person->the_meta();
<?php $mb_person->the_value('name'); ?>
<?php $mb_person->the_value('job'); ?>
But how can I get these to use the post type persons and the ID of “bruce-wayne” for some metaboxes?
$ident = $mb_heroes->the_value('identify');
/* get the value 'XY' of the ID set in $ident */
<?php $mb_person->the_value('name', $ident); ?>
<?php $mb_person->the_value('job, $ident'); ?>
Do you understand what I mean? I want the post “Superheroes” to show me the metadata of a variable person I set in a metabox $identify
You must be logged in to reply to this topic.