Getting content from WordPress to InDesign
PHP JavaScript
Latest commit f26c9fc Feb 1, 2016 @wpdavis wpdavis Update README.md
Adding my personal email address, as the BDN one is defunct.
Permalink
Failed to load latest commit information.
README.md Update README.md Feb 1, 2016
WP Browser.jsx Update WP Browser.jsx Apr 29, 2014
bdn-indesign.php Fix type error Oct 6, 2015

README.md

Read more/comment/ask questions: http://dev.bangordailynews.com/2014/03/21/wordpress-to-indesign-the-final-countdown/

This is a WordPress plugin to format posts as Indesign Tagged Text. It is intended to be used in conjunction with the WP Browser.

This is not a plug-and-play plugin. You will have to modify the plugin to set the API key and insert your own paragraph styles.

This repository also includes the Javascript version of the WP Browser. It runs on both Macs and PCs and also requires some configuration.

Note about the WP Browser:

When InDesign makes a call to the server, it does so by creating a socket connection and then requesting the path, or something.

In short, your server will see a request come in for localhost/wp-admin/admin-ajax.php?etc

So, especially on multisite and possible on regular WordPress, you'll need to set the host for it to work.

I did this by adding the following line to wp-config.php. There's probably a better way to do it:

if( ( $_SERVER[ 'HTTP_HOST' ] == 'localhost' || empty( $_SERVER[ 'HTTP_HOST' ] ) ) && !empty( $_GET[ 'action' ] ) && ( $_GET[ 'action' ] == 'wp-browser-search' || $_GET[ 'action' ] == 'wp-browser-notify' ) )
    $_SERVER[ 'HTTP_HOST' ] = 'mysite.com';

Oh, and...

I just ripped a lot of this out of the BDN site and took a lot of our serious customization out. It will definitely require customization. It might break. Email me at will@wpdavis.com if I did something stupid. But it's mostly what we're using.