Support » Everything else WordPress » Custom SQL queries

  • Hi, to all out there. I’m wondering if it is possible to do straight custom SQL queries into the wordpress database while still making use of the templates. Obviously, one could use wp-admin as a backend content management system, and then do a separate webpage outside of the wordpress directory.

    Still I like the usability of the themes, but find the template tags a bit limited for what I’m trying to accomplish (in general), even though very convenient. As such it would be nice to be able to combine standard SQL queries with template tags.

    However, I’ve found that when I submit an SQL query, it messes up $wp_query, and my content within the loop is altered. I don’t understand fully why, but I’d like to be able to SQL queries without making a new $WP_query object, and without messing up the $wp_query object that is standard for the wordpress loop. Is this possible to acheive?

  • The topic ‘Custom SQL queries’ is closed to new replies.