Topic: MODx & Wordpress Integration  (Read 561 times)

Pages: [1]   Go Down

#1: 21-Jan-2010, 04:58 AM


bunk58
Posts: 1,800

David Bunker

WWW
Here's a 'lite' mashup between an existing MODx site and a new Wordpress install ilre.com/blog
The header, menu, footer and sidebar (from PROPERTIES BY DESTINATION and below) all come from MODx, the rest is Wordpress.
The Wordpress theme was hacked about to include the MODx generated html content by a custom include function and uses a mix of MODx & Wordpress CSS.
Most of the time was spent on understanding the way Wordpress worked, the MODx side of things was easy  Smiley
The client is happy with the 'seemless' integration, I am too, as I have another one to do which should now be fairly straightforward.

#2: 21-Jan-2010, 05:16 AM


sharkbait
Posts: 1,611

wow - looking good, great to see both systems get along nicely
« Last Edit: 21-Jan-2010, 05:19 AM by sharkbait »

#3: 4-Feb-2010, 08:30 AM


micronetic
Posts: 30

WWW
You have done it really nice with Wordpress and MODx.


I did it also on my site but I got some questions if it is possible to use the MODx AjaxSearch WITH Wordpress?

#4: 5-Feb-2010, 03:12 AM


bunk58
Posts: 1,800

David Bunker

WWW
AjaxSearch 1.9.0 has a &whereSearch parameter, but it seems to be for tables within the MODx database only.
Might be worth posting on the AjaxSearch forum.

#5: 11-Mar-2010, 05:49 AM


e-stonia
Posts: 69

MODx - I'm lovin' it:)

WWW
Hey, nice job - I gave a try long ago to do same thing but didn't work out. What did you write into Wordpress theme to include from MODx page? Or what did you hack in Worpress theme?
Thanks, Kaspar.

#6: 11-Mar-2010, 08:04 AM


bunk58
Posts: 1,800

David Bunker

WWW
To point you in the right direction:
In my wordpress theme I added this to the functions.php file:
Code:
function get_modx_content($url) {
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_HEADER, 0);
ob_start();
curl_exec ($ch);
curl_close ($ch);
$string = ob_get_contents();
ob_end_clean();  
echo $string;  
}
Then in the index.php file added the css & js files from MODx e.g.
Code:
$base_url = 'http://www.modx-domain.com/';
<link rel="stylesheet" type="text/css" href="<?php echo $base_url?>assets/templates/menu.css" />
<script type="text/javascript" src="<?php echo $base_url?>assets/js/jquery.min.js"></script>
In the index.php file where I needed the menu (a MODx page containing a Wayfinder call) or other content from MODx I added :
Code:
 <?php get_modx_content(''.$base_url.'wp_menu.html'); ?>
This is the other MODx/Wordpress site I did, it only uses the MODx menu & footer.

#7: 11-Mar-2010, 08:30 AM


e-stonia
Posts: 69

MODx - I'm lovin' it:)

WWW
Thanks a lot - I'll give a try:)
Pages: [1]   Go Up
0 Members and 1 Guest are viewing this topic.