Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   Adding some code (http://forum.bytesforall.com/showthread.php?t=263)

Steve_T Feb 7, 2009 09:31 AM

Adding some code
I'd like to add some code to the top of the right side bar. Where do I do this and in what file?


Flynn Feb 7, 2009 10:37 AM

For HTML and Javascript code use the text widget, for PHP code this widget http://wordpress.org/extend/plugins/php-code-widget/

Steve_T Feb 7, 2009 12:13 PM

thanks for that - I was trying the text widget but php would not go in. I'll install that plugin

Cactus Feb 7, 2009 12:19 PM

I installed the plugin and put in this:
<?php include 'http://www.mydomain.de/wordpress/link.php'; ?>

and get this error

Warning: include() [function.include]: URL file-access is disabled in the server configuration in /var/www/web58/html/nydomain/wp-content/plugins/php-code-widget/execphp.php(37) : eval()'d code on line 1

what`s wrong??? :confused:

Flynn Feb 7, 2009 12:41 PM

Try to add this to your .htaccess file


php_value allow_url_fopen on
or create a .htaccess file with that content

But if you're using permalinks you should have a .htaccess file at /yourdomain.com/.htaccess

Or perhaps your host allows a custom php.ini. Then put


allow_url_fopen On
into your custom php.ini

Or use curl http://www.php.net/manual/en/curl.examples-basic.php
That may be allowed on your host

Cactus Feb 7, 2009 02:03 PM

It's not working. Do you have another idea? It's a problem with my provider/webspace?

Flynn Feb 7, 2009 02:13 PM

What's not working? What did you do?

Cactus Feb 7, 2009 02:30 PM

I put the code you have given to me at the htaccess file. But now I am getting an 500 error.

Flynn Feb 7, 2009 02:37 PM

Is that file you're trying to include even on a remove host? If not you should include it locally like this, and you might not have that problem in the first place
PHP Code:

<?php include '/var/www/web58/html/nydomain/wordpress/link.php'?>

You would have to figure out the right path to the file. The first part up to /var/www/web58/html/nydomain should be correct as can be seen by that error message you posted earlier.

If the file IS on a remote host then you would have to try CURL instead of include, see the URL I gave you, or get your host to allow you to include remote files by setting PHP to allow_url_fopen On

Cactus Feb 7, 2009 04:28 PM

the problem is, that the text I want to put in is on another domain.
Do you have an idea what to do in this case?

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

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