Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #606182

    HI, strange thing happening. I have created a Custom Post Type in Enfold. When I add the line that supports excerpts and thumbnails (http://screencast.com/t/lEZLI3lNdc), suddenly any pop-up text block editors appear white. My console shows this error: ‘quicktags is not defined’ http://screencast.com/t/7Jpmcr41hE. When I comment out that line in my CPT definition, everything is fine, but I also notice that Firebugging the editor shows a completely different set of classes and wrappers on that same text block editor, simply when I have that line in or out of the CPT definition. I don’t think it’s a plugin since this is what triggers the problem on/off. Everything is up to date, the WP core is 4.4.2 and Enfold is 3.5.

    #606223

    Hi!

    Try using this code to enable ALB on your CPT instead;

    add_filter('avf_builder_boxes','enable_boxes_on_posts');
    function enable_boxes_on_posts($boxes) {
    	$boxes[] = array( 'title' =>__('Avia Layout Builder','avia_framework' ), 'id'=>'avia_builder', 'page'=>array('portfolio', 'page', 'post', 'CTP SLUG'), 'context'=>'normal', 'expandable'=>true );
    	$boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('portfolio', 'page', 'post', 'CTP SLUG'), 'context'=>'side', 'priority'=>'low');
    	$boxes[] = array( 'title' =>__('Additional Portfolio Settings','avia_framework' ), 'id'=>'preview', 'page'=>array('portfolio', 'page', 'post', 'CTP SLUG'), 'context'=>'normal', 'priority'=>'high' );
    	
    	return $boxes;
    }

    Cheers!
    Josue

    #606317

    Josue- thanks for the quick reply. But that seemed to render almost everything gone. It left me only the excerpt. http://screencast.com/t/PzTHu1Jm. No JS errors, just missing the main parts of the editor now. This is how I changed my functions: http://screencast.com/t/UJUH99ca5Hl.

    #606324

    Ok revert back to the old code you were using. Can you please create me a WordPress administrator account? post it here as a private reply.

    #606332

    Attaching in private…

    #606335

    When registering the Members CPT you missed editor from the supports parameter so TinyMCE wasn’t being included there, i’ve changed it to:

    // CPT for Team Members
    function create_posttype() {
    
            register_post_type( 'team_members',
            // CPT Options
                    array(
                            'labels' => array(
                                    'name' => __( 'Team Members' ),
                                    'singular_name' => __( 'Team Member' )
                            ),
                            'public' => true,
                            'supports' => array( 'excerpt', 'thumbnail', 'editor' ),
                            'has_archive' => true,
                            'rewrite' => array('slug' => 'team-members'),
                    )
            );
    }
    #606340

    Awesome. You learn something every day (10 minutes:) I don’t think I’ve ever included it before and maybe was just lucky it didn’t cause a problem! Or maybe I did and didn’t realize.

    Thanks!

    #606341

    You are welcome, glad to help :)

    Regards,
    Josue

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.