Marsedit mangling Wordpress "more" tags
  • Hi,

    Just a quick one - I make extensive use of Wordpress' 'more' tag to split my posts with custom text.

    eg,

    Will provide a link to the full post with the "Click to continue reading" as the anchor text.

    However, if I re-edit the post in Marsedit, the post is split into a body and extended entry, with the custom text lost.

    Is there a way round this?

    Thanks
    Jon
  • Hi Jon - unfortunately I don't think there is a way around this. The <--more--> tag as used in WordPress's web admin UI is more-or-less a shorthand for getting the content into the respective body and extended fields. When MarsEdit asks for the content of a post, it comes with the body and the extended separated, so that's how MarsEdit presents it for editing.

    It seems to me that the custom text for the "Click to continue reading" could be implemented in the WordPress theme instead of trying to customize it every time in the more tag itself. That might be a possible solution for you, and would save you the trouble of having to use the custom more tag all the time.
  • Darnit. If true, this seems like an egregious omission from the WordPress API. I can’t use MarsEdit on my WordPress blog because of this. :-(

    --
    Kevin Yank
    http://www.kevinyank.com/
  • I note that when you use a tag in the WordPress web authoring UI and then return to edit the post, the tag remains (including custom text if provided), and the Excerpt field remains empty. Is this functionality really not supported via the XML-RPC API?
  • What I'm planning on doing is have my theme get the "more" text from a custom field instead, and set the field from within MarsEdit... a bit hacky, but should work.

    Now I just need support for featured images ;-)

    Question - MarsEdit seems to be using the metaweblog API rather than the WP API for my WP blog; is this the case? If so, is there anything "extra" in the WP API that allows this?
  • JonRead: If you have the right setting for System API in MarsEdit's blog settings, then MarsEdit is using WordPress API when appropriate (e.g. for adding new categories, getting pages, etc.).

    WP API is an extension on Movable Type and MetaWeblog APIs. This means that for many methods, the metaWeblog variant is still the most appropriate command to use. For example, there is no "wp.getRecentPosts". It still makes sense for MarsEdit to use metaWeblog.getRecentPosts even when using the WP API.
  • Sentience: I'm having trouble completely understanding the gist of your second comment. What is the relationship of this "more tag" customization to the Excerpt field? How is MarsEdit not behaving that you wish it would be?
  • Hi Daniel,

    In WordPress’s web admin, I create a post containing this:

    <!--more Read the full interview transcript-->


    If I save the post and re-open it, the tag remains right where I put it in the post body, unchanged. WordPress displays the post as if I had written separate excerpt and extended content fields, but it doesn’t store it that way—it stores it as a single post field containing the tag above.

    In MarsEdit, if I create a post containing the above, send it to WordPress, and then re-open it in MarsEdit, the post body is split, and the custom ‘more’ link text (“Read the full interview transcript”) is lost.

    I find it unbelievable that WordPress would support preserving the <!--more--> tag in its web admin, but not via its API. If true, I would report this as an API bug.

    --
    Kevin Yank
    http://www.kevinyank.com/
  • Hi Kevin - thanks for the details. I think it's not so much a case of WordPress being unable to preserve the custom "more" markup from a remote editor such as MarsEdit, as that MarsEdit, using the standard API WordPress provides, splits it up into two sections so that there is no "more" markup at all in the content that MarsEdit sends.

    So, when communicating through the API, there is no place to put anything custom for the "more" markup. It's just two different sections, there is no more tag at all. I don't know any way to work around this limitation unless they were to enhance the API to accept a separate field in the API to specify a name for the "continue reading" link.
  • Daniel,

    Couldn’t you just send the entire post, <!--more--> and all, as the post body field?
  • sentience - I guess this is something to consider as a special case for WordPress. The beauty of the way it works now is that it uses a standard API mechanism that works on WordPress as well as many other blog systems. Usually I prefer not to deviate from the standard mechanism. I consider it something of an accident that WordPress will accept the body of the post with in it and convert it to body and extended sections.
  • I would also love to see an option in the WP blog set-up or even a MarsEdit preference to not *ever* split posts.

    I actually don't edit split posts in Marsedit because of the way the posts look in the editor.

    There is also a "bug" in that if I edit or view a split post then the next editing window I open for a new post is in split view mode by default.
  • Thanks for the feedback. I am planning on changing the way split posts work in MarsEdit so that the "split" divider will be a more conventional inline item, so hopefully the editor will work in a way that suits everybody better in a future update.
  • Awesome! The split post function is really the only thing that irks me about MarsEdit (yes, it's because I use Wordpress). Can't wait for this update.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!