• I’m converting an existing php page to a wordpress page. On the existing page, I have 2 units of dynamic html based on the values of a cookie. I have existing code that can open / process this.

    My question: What is the proper way to integrate custom code into a WP template. Do i need to make a function call for it within the worpdress umbrella, or can I just type my php code in the template?

    Thanks & happy new year!

Viewing 1 replies (of 1 total)
  • If using WordPress 2.0 and you prefer to separate code from design in your templates, you can add a functions.php file to your theme and place any custom PHP functions in there. WordPress will include the file automatically.

    But hey, it’s your site, your WordPress. If the code is only to be used within the confines of your blog, do it however works best for you.

Viewing 1 replies (of 1 total)
  • The topic ‘Creating a custom function?’ is closed to new replies.