{"id":16434514,"url":"https://github.com/dflock/wp-modx-integration","last_synced_at":"2026-05-16T10:31:14.382Z","repository":{"id":13872764,"uuid":"16570743","full_name":"dflock/wp-modx-integration","owner":"dflock","description":"Wordpress Plugin provides template functions to access the MODx API and seamlessly integrate your Wordpress \u0026 MODx sites.","archived":false,"fork":false,"pushed_at":"2014-02-11T21:15:02.000Z","size":156,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-10T15:25:03.661Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dflock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-06T06:30:15.000Z","updated_at":"2018-02-19T13:25:22.000Z","dependencies_parsed_at":"2022-07-13T08:40:50.835Z","dependency_job_id":null,"html_url":"https://github.com/dflock/wp-modx-integration","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dflock/wp-modx-integration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflock%2Fwp-modx-integration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflock%2Fwp-modx-integration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflock%2Fwp-modx-integration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflock%2Fwp-modx-integration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dflock","download_url":"https://codeload.github.com/dflock/wp-modx-integration/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflock%2Fwp-modx-integration/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33098786,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T08:49:22.835Z","updated_at":"2026-05-16T10:31:14.368Z","avatar_url":"https://github.com/dflock.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wp-modx-integration\n\nWordpress Plugin which provides template functions to access the MODx API and seamlessly integrate your Wordpress \u0026amp; MODx sites.\n\n## Description\n\nThis plugin provides two template functions that allow you to use the site's MODx core to execute MODx chunks and snippets and return the output, so that it can be displayed in WP templates.\n\nThis has been tested with sites that have the MODx site installed in the root and wordpress installed in a sub-folder - often `/blog` - like this:\n\n```\n    /\n    ├── /assets\n    ├── /blog\n    │    ├── wp-admin\n    │    ├── wp-content\n    │    └── wp-includes\n    ├── /manager\n    │\n    ├── index-ajax.php\n    ├── index.php\n    └── robots.txt\n```\n\nIf you have a different structure, you might need to change the `$manager_path = '../manager';` at the top of `modx_init.php`. This setting is used to find your MODx install's `/manager/includes/config.inc.php` file, so that the MODx settings can be read in.\n\nThese global MODx settings can be overridden just for this plugin by editing the `$modx_config` array in `modx_config.php`. Currently the only setting from here which is used is `base_url`. If you want to change this, you can edit this section at the bottom of `modx_init.php`:\n\n\n```php\n    // Get plugin local config\n    include_once('modx_config.php');\n    // Selectively override global modx config from plugin local version\n    $modx-\u003econfig['base_url'] = $modx_config['base_url'];\n    $modx-\u003econfig['site_url'] = $modx_config['base_url'];\n```\n\n### modxGetChunk($chunk_name)\n\nExecute the MODx chunk `$chunk_name` and return the rendered result as a string.\n\nE.g: To run the MODx chunk called `footer` and output the result in your Wordpress footer, add the following to your theme's `footer.php`:\n\n```php\n    \u003c?php modxGetChunk('footer'); ?\u003e\n```\n\n### modxRunSnippet($snippet_name, $param_array)\n\nExecute the MODx snippet `$snippet_name` and return the rendered result as a string.\n\nE.g: To replicate these two MODx snippet calls and output the result:\n\n\n```\n    [[Wayfinder?startId=`0` \u0026level=`1` \u0026sortBy=`menuindex` \u0026sortOrder=`asc`]]\n    \n    [[Ditto?parents=0\u0026display=5\u0026tpl='@CODE:\u003cli\u003e\u003ca href=\"[+url+]\" title=\"[+pagetitle+]\"\u003e[+pagetitle+]\u003c/a\u003e \u003cspan\u003e[+date+]\u003c/span\u003e\u003c/li\u003e']]\n```\n\nyou would add the following to your Wordpress template:\n\n```php\n    \u003c?php modxRunSnippet('Wayfinder', array('startId' =\u003e 0, 'level' =\u003e 1, 'sortBy' =\u003e 'menuindex', 'sortOrder' =\u003e 'asc')); ?\u003e\n    \n    \u003c?php modxRunSnippet('Ditto', array('parents' =\u003e 0, 'display' =\u003e 5, 'tpl' =\u003e '@CODE:\u003cli\u003e\u003ca href=\"[+url+]\" title=\"[+pagetitle+]\"\u003e[+pagetitle+]\u003c/a\u003e \u003cspan\u003e[+date+]\u003c/span\u003e\u003c/li\u003e')); ?\u003e\n```\n\n## Installation\n\nUpload the plugin to your blog's `/wp-content/plugins`, Activate it, then start using the template functions in your templates.\n\n## TODO\n\n* The way the plugin is configured is pretty terrible.\n* Make it auto-detect MODx Evo/Revo version and just work. Currently only works with MODx Evo, afaik.\n* More testing.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdflock%2Fwp-modx-integration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdflock%2Fwp-modx-integration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdflock%2Fwp-modx-integration/lists"}