[Resolved] Custom SQL Query inside loop
In my header, I’m trying to make wordpress automatically generate a hyperlink to a post using a custom SQL query. The query is supposed to fetch the ID of the post to be linked based on a variable generated from the title of the current post. The query works when I execute it in MySQL, but in wordpress it doesn’t, I just get a blank page.
Can I execute sql query’s from within the loop? If not, how do I use information from the current post as variables for my query?
Let me know if you need more detail. Thanks for any help.
- The topic ‘[Resolved] Custom SQL Query inside loop’ is closed to new replies.