Hopefully this might just help someone out – to many people, it’ll seem obvious, but when you’re getting frustrated, you tend to overlook the obvious…
When you’re editing WordPress themes, and you’re including content from a separate database, make sure WordPress is able to connect to the database its data is stored in at the end. I had a custom header and footer set up, and utilised a database connection to get page data. After some investigation, I realised that WordPress needed its database connection back – doh!
Posted in Web Development
While working on a WordPress theme recently, I came across a particularly frustrating issue. The aim was to integrate the existing site header into the blog and, thinking this would be simple matter of a PHP include/require, I went straight ahead. However, I was wondering why variables in the included file were being ignored. It basically came about because I forgot about what require_once does – requires that file once. After using require, the variables magically appeared! Wow!
Posted in Web Development