Support » Fixing WordPress » Custom Code

  • theshadraq


    I recently took on a project for a small non-profit to give them some functionality in their website. I’ve done a lot of PHP/JQUERY/AJAX and the lot, but nothing in WordPress. Needless to say I’m a bit stumped.

    There wasn’t a plugin that I could find that did what this group needed, so I built custom functionality.

    My question is this – what do I include so that my code shows inside the header / footer / sidebar(s) as though it’s part of the site.

    I assume getting it to upgrade with the site when changing themes is alltogether different..for this, I’m just looking for it to look cohesive now.


Viewing 2 replies - 1 through 2 (of 2 total)
  • michael.mariart


    I’d suggest that you look at putting your code inside a plugin so that it can be easily moved around, and you don’t have to worry about any upgrades.

    As for putting them into your theme, it’s easy. You just need to call your functions from your templates. If you want to use it in posts, you can look at Shortcodes and if you want to add it to sidebars, you can look at Widgets.



    I’ve written a lot of custom Javascript too so I’ll have to see about the plugins that add my code to the site.

    Thanks, I’ll give it a go (the site you mentioned) and let you know if I have any questions.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Code’ is closed to new replies.