-
Notifications
You must be signed in to change notification settings - Fork 800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Markdown in Custom Fields #155
Comments
cc: @mattwiebe |
Thanks Georges. |
This could be a wontfix issue -- we can't apply it to every field when it's saved, so custom fields may need some way added to attach the markdown parser. I leave that call to Wiebe, though, he knows how it's architected best. |
Supporting Markdown in plugins like ACF will be left to those plugins if they wish to do so. The function you'd need would be As for custom post types, support can be added for them via |
Also, you'd need to |
Thanks for your comments.
But it change nothing. I miss the second one. How can I add it? |
You do need to switch out |
Yes I do. |
I was able to get Markdown to work on a Custom Post Type by adding the following to a functionality plugin: add_action('init', 'my_custom_init');
function my_custom_init() {
add_post_type_support( 'product', 'wpcom-markdown' );
}
That's already possible. If you can change the code generating the custom post type, you can add Markdown support like so: // Register Custom Post Type
function custom_post_type() {
$labels = array(
'name' => _x( 'Products', 'Post Type General Name', 'text_domain' ),
);
$args = array(
'label' => __( 'product', 'text_domain' ),
'supports' => array( 'title', 'editor', 'publicize', 'wpcom-markdown' ),
);
register_post_type( 'product', $args );
}
// Hook into the 'init' action
add_action( 'init', 'custom_post_type', 0 ); I tested it on a test site of mine and it works. |
It works perfect. Thanks a lot Jeremy for all your support! |
This worked for me, putting markdown in a custom post type. |
Jetpack Markdown for me worked with the plugin Typewriter. |
Now I added the plugin: (Markdown Extra) [https://littoral.michelf.ca/code/php-markdown/php-markdown-extra-1.2.8.zip] And add-on: (ACF Wordpress Wysiwyg Field)[https://github.com/elliotcondon/acf-wordpress-wysiwyg-field] In functions.php I added:
|
Hi
Thanks for the Jetpack update 2.8 Beta 1
I use a lot Markdown. It works well in Editor but not yet in Custom fields like Excerpt or Custom Meta made with Advanced Custom Fields.
Do you plane to support this?
Thanks!
Grégoire
The text was updated successfully, but these errors were encountered: