Jump to content
Sign in to follow this  
amargautam

Where to put custom functions in a multisite network?

Recommended Posts

amargautam

Hi, I have a multisite installation and I wrote some custom code in functions.php of the main site to load the login form on top right corner of the page. When I created another blog and used pagelines framework again, the same code was inherited it seems. In this new blog, I do not want the login form on top right corner. Looks like the same functions.php is being used for the whole network and I do not think it is wrong. Perhaps, there could be another file where I can write my custom code and it does not reflect all over the network. I tried putting the code in the pagelines setting > Custom code > Headerscripts code. But this does not work correctly. Please advise. The main site is http://blogedu.in The network site that is inheriting the code is http://welfare.blogedu.in

Share this post


Link to post
Share on other sites
Danny
Hi, I think this is more of a Wordpress Multisite issue, rather than a PageLines issue. Therefore, I think the best course of action would be to contact the Wordpress support and ask them for advice.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
amargautam
@Danny - Sorry for my bad English, I am not a native English speaking person. But I do not think you understood my question. Let me rephrase it. Do we have any other way to put custom code without changing functions.php for pagelines? There is one - through the Headerscripts code but that is not working for me. Any other alternative please?

Share this post


Link to post
Share on other sites
Jenny
You could activate the Base Theme for each install and then add the code to the functions.php file in the base theme folder (via ftp) for each site.

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
amargautam
This sounds like an option. I will give it a try and will inform this forum about the results.

Share this post


Link to post
Share on other sites
amargautam
Hey simple_mama, You are awesome. I implemented the child theme and it is just what I wanted. I put all my custom php code in functions.php of the child theme and it works wonder. Child theme also allows me to put custom css. One benefit that I see by using child theme is that even if Pagelines tomorrow send me an update, i will not lose my changes. I can safety upgrade the parent theme. Cheers!

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  

×