• Resolved pivot

    (@pivot)


    I’ve followed the instructions but it’s just not responding. Working on posts and pages, though.

    What am I missing?

    Tried using this code in both functions.php and through suggested plug-in (that replaces functions.php-editing) but neither works:

    add_action(‘init’, ‘my_custom_init’); function my_custom_init() { add_post_type_support( ‘attachment’, ‘wpcom-markdown’ ); }

    • This topic was modified 2 years, 4 months ago by pivot.
    • This topic was modified 2 years, 4 months ago by pivot. Reason: Typo

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi there,

    I assume you’re trying to add markdown support to your custom post types. The attachment post type is not a custom post type but a default one. Replace ‘attachment’ with the identifier for your custom post type.

    Thread Starter pivot

    (@pivot)

    Hey,

    I’m actually trying to add markdown support to the “attachment” post type (specifically the description-field). But that doesn’t seem to be activated together with the post and pages post types..

    How do I get it working with attachment post types?

    Check out these attachment pages for examples of non-functioning markdown: https://mj.shared.no/20b07470-94cf-423f-8dfe-44b1e8f16891/
    https://mj.shared.no/d2f15297-50ec-4ca9-bee9-990288580380-2/

    This is how the template calls for the description-field for the current attachment:

    <?php echo wpautop( $image_meta['description'] ); ?>

    • This reply was modified 2 years, 4 months ago by pivot.

    Thanks for the clarification.

    Unfortunately, Jetpack Markdown only works for posts, pages, and comments. Jetpack uses Markdown Extra, a PHP extension by Michel Fortin. There’s more information about this in the support documentation. You might be able to get a developer to implement markdown for other fields of interest that you need. There are also some comments on this related GitHub issue that you might find helpful.

    Thread Starter pivot

    (@pivot)

    Well, that sucks ??

    So, if the attachment-page actually was a custom-post I would have more luck getting this activated? That’s unfortunately a bit backwards…

    I’ve read the GitHub issue you’re referring to but that didn’t help me either. Unless there is something I misunderstand.

    However, I now notice this issue and how it was actually resolved rather quickly by Jetpack: https://github.com/Automattic/jetpack/issues/2396

    If no markdown for the attachment post types then I guess I will have to stay with html instead

    Plugin Support lastsplash (a11n)

    (@lastsplash)

    Unfortunately, it sounds like you will have to use HTML instead in this case. If it was indeed a custom post type you would be able to use Markdown.

    I’m going to go ahead and mark this thread as resolved for now. If you have additional questions about Jetpack in the future, feel free to open a new thread.

    Thread Starter pivot

    (@pivot)

    Ok, I will.
    Can you edit my post further up and remove the references to my site? It is not intended to be public, so the less it’s linked to the better ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Unable to get markdown working on Attachment (Description field)’ is closed to new replies.