Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Post-Kicker, -Byline & -Footer (http://forum.bytesforall.com/forumdisplay.php?f=17)
-   -   [SOLVED] <?php include ...?> is not working (http://forum.bytesforall.com/showthread.php?t=3264)

astera Sep 3, 2009 06:28 PM

[SOLVED] <?php include ...?> is not working
 
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

juggledad Sep 5, 2009 06:07 AM

what is the url?

astera Sep 5, 2009 01:37 PM

Hello,

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

astera

juggledad Sep 6, 2009 07:01 AM

ok I played with this for a while and I can't figure it out, maybe Flynn will chime in.

astera Sep 6, 2009 08:27 AM

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

Flynn Sep 15, 2009 04:03 PM

The templtepath constant is probably not available there. Try with

...

astera Sep 20, 2009 09:02 AM

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

Flynn Sep 20, 2009 06:06 PM

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

astera Sep 21, 2009 12:52 AM

Hey Flynn,

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

best regards
astera


All times are GMT -6. The time now is 03:04 AM.

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