Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Post-Kicker, -Byline & -Footer »

How to insert php code into Byline


  #1  
Old Aug 27, 2009, 02:25 AM
JakeThePeg
 
37 posts · Aug 2009
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);

}
?>
  #2  
Old Aug 27, 2009, 06:16 PM
juggledad's Avatar
juggledad
 
23,667 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
I believe the $val should be $value - check the PHP syntax for the FOREACH statement
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Header Drop Down Navigation (Where to insert the code) rockport Header configuration & styling 7 Nov 15, 2010 07:57 PM
placing favicon code into header.php AlbaSurf Header configuration & styling 1 Aug 26, 2009 08:55 PM
[SOLVED] Where in Atahualpa is the code normally found in sidebar.php?? lhanft Sidebars & Widgets 2 Aug 9, 2009 05:10 PM
Which php file should I Edit to Insert Opt In form in SideBar for Atahualpa Theme? kacang Sidebars & Widgets 0 Aug 1, 2009 03:41 AM
How to insert Gravatar into Byline? vsamigo Post-Kicker, -Byline & -Footer 1 Jul 15, 2009 04:02 PM


All times are GMT -6. The time now is 03:49 PM.


Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.