Support » Plugin: Custom Content Type Manager » MySql fields to Placeholders

  • Resolved jakat


    Might come out as a really stupid question, but I’ll shoot anyway… Is there a way to configure a [+placeholder+] to display elements from another table in the WP database. Namely, I am using ai1ec to present events. It stores event dates in its own table (under ‘start’) and it would be great if I could display it in a custom post widget using a placeholder. Possible? Difficult?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor fireproofsocks


    The placeholder approach is just find/replace stuff. So the question confuses me — how are you retrieving the data? If you’re using PHP in your templates, do whatever you want — print_r is your friend. If you’re using a shortcode (e.g. Summarize Posts: then you are only querying data in the wp_posts table, not in a custom table. I don’t think it does you much good here, but generally the answer is “yes, you can use the CCTM::parse() function to find and replace any placeholders with values contained in a corresponding associative array.”

    Thanks I will follow your advices although I have already figured a workaround to this issue.

    Plugin Contributor fireproofsocks


    Glad you figured a workaround — sorry I did not fully grasp the problem. You may want to look at my PHP-Snippets plugin:

    It lets you put PHP into your posts and pages via shortcodes … maybe you can create the PHP code you need using that.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘MySql fields to Placeholders’ is closed to new replies.