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 »

Adding some code


  #1  
Old Feb 7, 2009, 10:31 AM
Steve_T
 
59 posts · Jan 2009
I'd like to add some code to the top of the right side bar. Where do I do this and in what file?

Thanks
  #2  
Old Feb 7, 2009, 11:37 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
For HTML and Javascript code use the text widget, for PHP code this widget http://wordpress.org/extend/plugins/php-code-widget/
  #3  
Old Feb 7, 2009, 01:13 PM
Steve_T
 
59 posts · Jan 2009
thanks for that - I was trying the text widget but php would not go in. I'll install that plugin
  #4  
Old Feb 7, 2009, 01:19 PM
Cactus
 
13 posts · Feb 2009
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???
  #5  
Old Feb 7, 2009, 01:41 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Try to add this to your .htaccess file

Code:
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

Code:
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
  #6  
Old Feb 7, 2009, 03:03 PM
Cactus
 
13 posts · Feb 2009
It's not working. Do you have another idea? It's a problem with my provider/webspace?
  #7  
Old Feb 7, 2009, 03:13 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
What's not working? What did you do?
  #8  
Old Feb 7, 2009, 03:30 PM
Cactus
 
13 posts · Feb 2009
I put the code you have given to me at the htaccess file. But now I am getting an 500 error.
  #9  
Old Feb 7, 2009, 03:37 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
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
  #10  
Old Feb 7, 2009, 05:28 PM
Cactus
 
13 posts · Feb 2009
Hello
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?

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding ShareThis Code to Post Footer clearlygold Post-Kicker, -Byline & -Footer 4 Jun 4, 2009 10:54 AM
Archive : code help BooNMiNG Atahualpa 3 Wordpress theme 4 May 31, 2009 11:49 AM
Help! Cannot remember where my Adbrite code goes Paleo Pat Atahualpa 3 Wordpress theme 7 Apr 5, 2009 06:45 PM
Easy way to test code? paulae Plugins & Atahualpa 0 Mar 26, 2009 08:43 AM
Ad Rotator Code in Horbar1 TikiBoy Atahualpa 3 Wordpress theme 2 Mar 7, 2009 11:00 AM


All times are GMT -6. The time now is 06:25 PM.


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