Adding a Custom Field Next to Post Title in Dropdown SQL Query CCTM Plugin
-
I am trying to make a dropdown menu using Custom Content Type Manager Plugin that shows the results like this “Acme Clinic, Los Angeles, CA”. With “Acme Clinic” being the post_title, and “Los Angeles” being cliniccity custom field and “CA” being the clinicstate custom field. However, the custom content type manager states this:
Checkbox:
[]Execute as a MySQL query? Select up to 2 columns: the 1st column will be the visible label and the 2nd column (if present) will represent the value stored in the database. Use [+table_prefix+] instead of hard-coding your WordPress database table prefix.And the query I am currently using is:
SELECT post_title, ID
FROM [+table_prefix+]posts
WHERE post_type=’clinics’ ORDER BY post_title…which only returns the post_title as the <option> and the ID is the value of the option. How can I add “cliniccity, clinicstate” to the first result so I have (post_title, cliniccity, clinicstate)?
- The topic ‘Adding a Custom Field Next to Post Title in Dropdown SQL Query CCTM Plugin’ is closed to new replies.