Howdy, I'm inserting the following piece of code into my "Byline: Multi-page posts" field. Instead of being executed, the code is being displayed on my site from the word "val" onwards (highlighted in red below). Why is this?
<?php
$related_posts = MRP_get_related_posts($post_id);
foreach($related_posts as $key => $val) {
$my_query->post->ID = $key;
$my_query->post->title = $val->related_post_title;
the_attached_image('your_parameters=values', $my_query);
}
?>