I have a php function that generates a comma separated list of Post IDs that specify the order those posts should display on my WordPress site.
I’m looking for a place I can insert an SQL query like:
SELECT * FROM wp_posts WHERE ID IN ('1', '2', '3')
Which .php file should I modify? How should I phrase the SQL?
First off you should use
wp_queryfor this. It is designed to query posts.About the placement
I advise to do it in a custom template, make a simple template with the code above, create a page assign it that template and make the page private.