• 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)?

Viewing 1 replies (of 1 total)
  • Thread Starter PMWebDevelopment

    (@mulkins2013)

    …And an FYI, I already tried using the custom field cliniccity and it says it isn’t a valid field. And it is a custom field that I created in CCTM. So not sure what I am missing.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding a Custom Field Next to Post Title in Dropdown SQL Query CCTM Plugin’ is closed to new replies.