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 »

[SOLVED] <?php include ...?> is not working


  #1  
Old Sep 3, 2009, 06:28 PM
astera's Avatar
astera
 
5 posts · Sep 2009
Hello,

I put my php code in files and leave them under the templatepath.
So far so good.
As I want to put in "Atahualpa 3.4.1" in "Post & Pages" in ""Edit POST/PAGE INFO ITEMS in "KICKER: Single Post Pages" the php code:
PHP Code:
<?php include (TEMPLATEPATH 'landingsites.php'); ?>
or
PHP Code:
<?php include ('landingsites.php'); ?>
Nothing comes out.
But if I put the original code:
PHP Code:
<?php if (function_exists('ls_getinfo')) : ?>
    <?php if (ls_getinfo('isref')) { ?>
        <div class="landingsites">
            <h2>Ihre Suche nach: <?php ls_getinfo('terms'); ?></h2>
            <p>Sie kommen von <?php ls_getinfo('referrer'); ?> und suchen nach <em><?php ls_getinfo('terms'); ?></em>. Folgende Beitr&auml;ge k&ouml;nnten von Interesse f&uuml;r sie sein:</p>
            <ul>
            <?php ls_related(510'<li>''</li>'''''falsefalse); //related post from content ?>
            <?php ls_related_tags(5'<li>''</li>'); //related posts from tags ?>
            </ul>
        </div>
    <?php ?>
<?php 
endif; ?>
then its OK.
What is wrong. Please, can anybody help me?
My WP-Version is 2.84 my PHP Version : 4.4.2-Debian-0.1~sarge1

Thx in advanced
astera
  #2  
Old Sep 5, 2009, 06:07 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
what is the url?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Sep 5, 2009, 01:37 PM
astera's Avatar
astera
 
5 posts · Sep 2009
Hello,

http://www.paulsen-automobile.de/

astera
  #4  
Old Sep 6, 2009, 07:01 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
ok I played with this for a while and I can't figure it out, maybe Flynn will chime in.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Sep 6, 2009 at 08:17 AM.
  #5  
Old Sep 6, 2009, 08:27 AM
astera's Avatar
astera
 
5 posts · Sep 2009
Hello juggledad,

thanks for your commitment.

Please try this google-search:
http://www.google.de/search?hl=de&nu...a=lr%3Dlang_de
Then follow the first SERP Entry
http://www.google.de/url?sa=t&source...3b8ZvlGkSz4G7w
Then you are in a single post where you can see normaly the result of the landingsite plugin. But now you see nothing.

thx in advanced
astera
  #6  
Old Sep 15, 2009, 04:03 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
The templtepath constant is probably not available there. Try with

...

Last edited by Flynn; Sep 20, 2009 at 06:06 PM. Reason: Removed silly code
  #7  
Old Sep 20, 2009, 09:02 AM
astera's Avatar
astera
 
5 posts · Sep 2009
Hello Flynn,

thx for the answer and sorry for delaying,I`m on holiday :-)

Sorry, but your solution don`t solve the problem.
I just tried the path I use for chCounter (I found it yet):
PHP Code:
<?php include( '/hp/ab/af/ey/www/pa/wp-content/themes/atahualpa/landingsites.php'); ?>
And now it`s OK.

Can you please tell me, why I have to put the root path in?

thx
astera
  #8  
Old Sep 20, 2009, 06:06 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
The code I gave you above was wrong, it was a URL instead of an include path

Try

<?php include (TEMPLATEPATH . '/landingsites.php'); ?>

Note the slash
  #9  
Old Sep 21, 2009, 12:52 AM
astera's Avatar
astera
 
5 posts · Sep 2009
Hey Flynn,

thx for your answer. It`s working too.
You can set this post as complete.

best regards
astera

Bookmarks

Tags
include php

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
php in footer.php - links to just show up on homepage chris Atahualpa 3 Wordpress theme 6 May 9, 2010 12:50 PM
How to include images in post in my RSS feed? stevesp RSS, Feeds & Subscribing 1 Sep 2, 2009 11:07 AM
make index.php be a "page" and blog postings go to different php page zhidoni Atahualpa 3 Wordpress theme 0 Jun 21, 2009 04:25 PM
[SOLVED] messed up header.php and footer.php monochrome Header configuration & styling 0 Jun 20, 2009 02:16 PM


All times are GMT -6. The time now is 02:29 AM.


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