We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20400
    • 37 Posts
    Modx is a great CMS and lets you do just about anything. WordPress is a great blog application - lousy CMS - but a great blog. It should be able to run both on the same site.

    In a Modx environment, where there are no Modx Web Users, they both run together nicely. Here is an article on how I did it - http://www.timr.ca/RecentArticles/cms/modx_wordpress.html.
      • 3749
      • 24,544 Posts
      Nice work!  Thanks for the contribution.  smiley

      I think these will give you the access you want to the $modx object for snippets in WP:

      In MODx Revolution:

      include 'path_to_modx_core/model/modx/modx.class.php';
      
      $modx = new modx();
      $modx->initialize('web');


      You might want to use a context other then the default ’web’.

      In earlier versions:

      include_once(MODX_MANAGER_PATH.'/includes/document.parser.class.inc.php');
      $modx = new DocumentParser;


      Look just below that code in index.php for some options you might want to set.

        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 20400
        • 37 Posts
        Thanks for the suggestion -
        I thought something like that might work. However, I wasn’t sure if you would need to include the config file as well.
          • 3749
          • 24,544 Posts
          I don’t think you need it in Revolution. You might in 0.9.6. There’s no harm in including it (manager/includes/config.inc.php).
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 18623
            • 1 Posts
            What if my purpose is to integrate WP Posts & Comments in a ModX page? All my users are still fixed on wordpress for blog content, I can’t argue against them. I would still like the blog to be integrated inside my ModX site, especially for the blog to follow the site design. How can I use php to do that?

            Right now, I have a the blog RSS feed parsed through PieX, but this is text only... links, images, embedding do not follow.

            thx
              • 3749
              • 24,544 Posts
              Quote from: matjolic at Mar 03, 2009, 11:47 AM

              What if my purpose is to integrate WP Posts & Comments in a ModX page? All my users are still fixed on wordpress for blog content, I can’t argue against them. I would still like the blog to be integrated inside my ModX site, especially for the blog to follow the site design. How can I use php to do that?

              Right now, I have a the blog RSS feed parsed through PieX, but this is text only... links, images, embedding do not follow.

              thx

              If you search the forums, I think you’ll find some posts from people who have integrated WordPress with MODx in various ways. I’ve never done it.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 8345
                • 147 Posts
                Quote from: matjolic at Mar 03, 2009, 11:47 AM

                Right now, I have a the blog RSS feed parsed through PieX, but this is text only... links, images, embedding do not follow.

                Why not? From PieX Wiki (http://wiki.modxcms.com/index.php/PieX):

                # [+description+] - summary of the current feed.
                # [+description(text)+] - summary of the current feed with all HTML tags removed
                # [+description(html)+] - summary of the current feed with all HTML tags except <a> and <img> removed.

                Also instructions for embeding.
                  • 8245
                  • 37 Posts
                  Can anyone tell me if it is still necessary to skin the wordpress blog if integrated in this fashion? Or are you directed to the wordpress site (away from the modx styled site) by the links?
                  I ask because I like the idea of having my blog in wordpress since there is huge support for migration of the data and more.. but I really want to have a fully integrated modx site with 1 templating system (1 admin would be nice too wink

                  any help/guidance would be greatly appreciated, I have also been looking into the ditto/jot blog, but have found it a little confusing.
                  I just don’t want to go down a path with the blog that may lead to limitations.
                    • 8062
                    • 4 Posts
                    Looks like 2 admins, not sure how it can be integrated into one. Wordpress admin is very complex.
                      • 12379
                      • 460 Posts
                      Looks like 2 admins, not sure how it can be integrated into one. Wordpress admin is very complex.

                      A quick fix is to create a new module named "WordPress" and enter in the code field:

                      header('Location: ' . $modx -> config ['site_url'] . 'blog/wp-admin' );


                      If there’s some way of sharing modx manager session and wp-admin’s then you’d possibly avoid the additional log-in above.
                        Mostly harmless.