Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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, 03: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, 07:16 PM
juggledad's Avatar
juggledad
 
23,765 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



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 08:57 PM
placing favicon code into header.php AlbaSurf Header configuration & styling 1 Aug 26, 2009 09:55 PM
[SOLVED] Where in Atahualpa is the code normally found in sidebar.php?? lhanft Sidebars & Widgets 2 Aug 9, 2009 06: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 04:41 AM
How to insert Gravatar into Byline? vsamigo Post-Kicker, -Byline & -Footer 1 Jul 15, 2009 05:02 PM


All times are GMT -6. The time now is 07:51 AM.


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