• There is a way i can define a default content for every post?

    I’ve tried this filter by wordpress, but it is not working:

    add_filter( 'default_content', 'my_editor_content' );
    function my_editor_content( $content ) {
        $content = "My default content.";
        return $content;
    }

    Is there a filter for this plugin or a way to configure it on the form edit settings?

    Thanks!!

Viewing 1 replies (of 1 total)
  • Plugin Author aharonyan

    (@aharonyan)

    From new version 3.7.0 you can use this filter fus_editor_js_default_content

    Example:

    add_filter('fus_editor_js_default_content', function ($default_content) {
    
    $default_content = [
    
    'time' => time(),
    
    'blocks' => [
    
    [
    
    'type' => 'paragraph',
    
    'data' => [
    
    'text' => __('Default Content', FE_TEXT_DOMAIN),
    
    ],
    
    ]
    
    ]
    
    ];
    
    return $default_content;
    
    });
Viewing 1 replies (of 1 total)
  • The topic ‘Default post content’ is closed to new replies.