We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29009
    • 3 Posts
    I was in the process of converting a wordpress theme to Modx and it had shortcodes. I’m not sure if this functionality already exists but I just wanted to be able to copy and paste the shortcodes as neccessary (Keep in mind wordpress specific calls won’t work ie. retrieve last 5 blog posts)

    All three files will need to be loaded as plugins.

    wp_shortcode is directly from the wordpress 3 svn with 1 modification (Last line removed)
    wp_shortcode_process is taken from an example of how to use modx plugins.
    and
    example_shortcodes are shortcodes that I found looking around the web.

    I attached to System Event OnWebPagePrerender but really you could attach anywhere the content has been generated.

    This is just a rough draft and works for my particular uses just fine. If anyone would like to clean it up a bit and package it properly please feel free to. I would love to hear any thoughts.

    Thanks



      • 12110
      • 122 Posts
      This sounds great - I just ha been wondering if the WP Shortcode system could be brought to MODx.

      Did not test yet - do the shortcodes in any way integrate into the TinyMCE UI for the editor to choose from?

      Thanks in any case, it could be a great addition.