How to insert php code into Byline
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); } ?> |
I believe the $val should be $value - check the PHP syntax for the FOREACH statement
|
All times are GMT -6. The time now is 12:34 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.