get_field('code'); $dragon_name = $dragondata->get_field('name'); $dragon_breed = $dragondata->get_field('breed'); $dragon_gender = $dragondata->get_field('gender'); $dragon_coga = $dragondata->get_field('coga'); $dragon_pol = $dragondata->get_field('part_of_a_lineage'); $dragon_lineage = $dragondata->get_field('lineage'); $dragon_generation = $dragondata->get_field('generation'); $dragon_mother = $dragondata->get_field('mother'); $dragon_father = $dragondata->get_field('father'); $dragon_armypart = $dragondata->get_field('part_of_an_army'); $dragon_army = $dragondata->get_field('army'); $dragon_partnerava = $dragondata->get_field('partner_available'); $dragon_partner = $dragondata->get_field('partner'); $dragon_partref = $dragondata->get_field('any_refusals'); $dragon_refpart = $dragondata->get_field('refused_partner'); $dragon_children = $dragondata->get_field('children'); $dragon_childwho = $dragondata->get_field('existing_children'); $dragon_gifted = $dragondata->get_field('gifted'); $dragon_gifter = $dragondata->get_field('gifter'); $dragon_giftnotes = $dragondata->get_field('gift_notes'); $dragon_morenotes = $dragondata->get_field('other_notes'); $dragon_url = $dragondata->get_field('permalink'); // Pick the chosen value out of the array - needed for if statements. $dragon_coga2 = $dragondata->get_field('coga.id'); $dragon_generation2 = $dragondata->get_field('generation.id'); $dragon_mother_info = new Pod('dragons', $dragon_mother); $dragon_mother_url = $dragon_mother_info->get_field('permalink'); $base_dragons_url = "http://dragoncreatures.com/dragons"; $dragon_father_info = new Pod('dragons', $dragon_father); $dragon_father_url = $dragon_father_info->get_field('permalink'); ?>

 

now testing to see if statements will work properly.
Let's test if the dragon has a mother and if so, who this mother is.
display( 'mother' ); echo " is "; echo $dragon_name; echo " 's mother
"; } else { echo ""; //We don't need to display anything if the dragon has no mother. } ?>test has succeeded.
Now let's see if we can have a link with the mother's name.
"; echo $dragondata->display( 'mother' ); echo ""; echo " is "; echo $dragon_name; echo " 's mother
"; } else { echo ""; //We don't need to display anything if the dragon has no mother. } ?> Test has succeeded
Let's test if the dragon has a father and if so, who the father is.
display( 'father' ); echo " is "; echo $dragon_name; echo " 's father
"; } else { echo ""; //We don't need to display anything if the dragon has no father. } ?>Test has succeeded
Now let's see if we can have a link with the father's name.
"; echo $dragondata->display( 'father' ); echo ""; echo " is "; echo $dragon_name; echo " 's father
"; } else { echo ""; //We don't need to display anything if the dragon has no father. } ?> Test failed, link is from the mother despite the coding for the father.