Jump to content
Sign in to follow this  
tramullas

Where to put PHP code?

Recommended Posts

tramullas    0
tramullas

Dear friends: I need to include some PHP code on the home page. It must go before the Wordpress loop. Can you explain in what file should I include? I can not find the corresponding template file. Thanks, Jes??s

Share this post


Link to post
Share on other sites
catrina    103
catrina
What is the PHP code supposed to achieve? (It's not advisable to edit any of the core files in the theme)

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
tramullas    0
tramullas
I need to control a slider genereted by Power Slider plugin. The code is 1, 'limit' => 10, 'width' => 600, 'height' => 300, 'style' => 'white', // 'white', 'none' 'animation' => 'fade', // 'fade', 'horizontal', 'vertical' 'speed' => 600, 'delay' => 4000 ) ); ?> I try it on the base theme functions file, but it crashes...

Share this post


Link to post
Share on other sites
Danny    1,327
Danny
Hi, What do you when you mean "but it crashes" ? You would most likely have to add it to the child themes or PageLines customisation plug-in function.php file. You will need to probably add it as a hook, at off like this: [code]//add_action('pagelines_before_postloop', 'power_slider'); function power_slider(){?> Code goes here![/code] You will also need to use the function is_home, click here for more information. http://codex.wordpress.org/Function_Reference/is_home I would also recommend contacting the author of the plug-in too.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
tramullas    0
tramullas
Dear Danny: When I try to do that, WP says internal server error 500, "...wp-admin/plugin-editor.php?file=pagelines-customize/functions.php&a=te&scrollto=364"

Share this post


Link to post
Share on other sites
Simon    247
Simon
Please post the code you are trying to use: http://paste.pagelines.com

Share this post


Link to post
Share on other sites
tramullas    0
tramullas
Posted on http://paste.pagelines.com/4p

Share this post


Link to post
Share on other sites
Simon    247
Simon
http://paste.pagelines.com/53

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×