New Landing How can we help? Cardinal Page templates

Viewing 15 posts - 1 through 15 (of 26 total)
  • Posted in: Cardinal
  • #254050
    davidll
    Member
    Post count: 205

    Hello

    Since the framework update – there is 17 pre set / saved ‘swift’ templates.
    How can I remove these – I’ve a set for my client… and they now see ‘About (Agency Four)’ and confused.

    Also – future request: would be great to ‘lock’ our templates (like you’ve locked your 17 pre set).

    Many thanks

    David

    #254371
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    Please activate your child theme, within the child theme functions.php file, please add or uncomment this if it already exists:

    Please also rename the below templates to match the ones you want to remove.

    	/* ADD/EDIT PAGE BUILDER TEMPLATES
    	================================================== */
    	function custom_prebuilt_templates($prebuilt_templates) {
    			
    		/*
    		*	You can uncomment the lines below to remove default templates
    		*/
    		unset($prebuilt_templates['home-1']);
    		unset($prebuilt_templates['home-2']);
    
    	    return $prebuilt_templates;
    
    	}
    	add_filter( 'spb_prebuilt_templates', 'custom_prebuilt_templates' );
    #254373
    davidll
    Member
    Post count: 205

    Thanks David

    I’ll add this now.

    As mentioned – would be good to lock our own templates.

    D

    #254377
    David Martin – Support
    Moderator
    Post count: 20834

    Ah sorry, yes – do you mean add your templates as pre-set like we do?

    Thanks.

    #254380
    davidll
    Member
    Post count: 205

    Ok – added the code / uncomment – and got a 500 error.

    Attached is a screenshot – I’d like to remove all the swift ones – like ‘About (Agency four)’
    How do I name these?

    If I can then be able to lock my own – like the swift ones – that’ll be ace

    Attachments:
    You must be logged in to view attached files.
    #254383
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    Please add your FTP details I’ll take a look.

    Did you do this within your child theme?

    Thanks.

    #254419
    davidll
    Member
    Post count: 205

    Hello

    Yes, did this with my child theme – got the error – and then reverted back.
    you say:

    Please also rename the below templates to match the ones you want to remove.

    So can you give me an example on how to remove About (Agency four)?

    Thanks

    D

    #254425
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    Sorry, can I confirm which Swift Framework plugin version you are running?

    Thanks.

    #254458
    davidll
    Member
    Post count: 205

    Hey – using the latest v2.0.3
    also the latest wordpress 4.4.2 / cardinal theme 2.4.2

    D

    #254472
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    The below is how you remove Home (Agency Four) and About (Agency Four).

    If you get a 500 error, it could mean there is a missing PHP closing bracket, I’d need your FTP details to see that.

    /* ADD/EDIT PAGE BUILDER TEMPLATES
     ================================================== */
     function custom_prebuilt_templates($prebuilt_templates) {
     
     /*
     * You can uncomment the lines below to remove default templates
     */
     unset($prebuilt_templates['agency-four-home']);
     unset($prebuilt_templates['agency-four-about']);
    
     return $prebuilt_templates;
     
     }
     add_filter( 'spb_prebuilt_templates', 'custom_prebuilt_templates' );
    #254495
    davidll
    Member
    Post count: 205

    Ok – It returns a 500.

    I can’t provide FTP – due to access being only granted via Cisco VPN

    SO I have this in my child functions:

    <?php
    	
    	/*
    	*
    	*	Cardinal Functions - Child Theme
    	*	------------------------------------------------
    	*	These functions will override the parent theme
    	*	functions. We have provided some examples below.
    	*
    	*
    	*/
    	
    	/* LOAD PARENT THEME STYLES
    	================================================== */
    	function cardinal_child_enqueue_styles() {
    	    wp_enqueue_style( 'cardinal-parent-style', get_template_directory_uri() . '/style.css' );
    	
    	}
    	add_action( 'wp_enqueue_scripts', 'cardinal_child_enqueue_styles' );
    	
    	/* LOAD THEME LANGUAGE
    	================================================== */
    	/*
    	*	You can uncomment the line below to include your own translations
    	*	into your child theme, simply create a "language" folder and add your po/mo files
    	*/
    	
    	// load_theme_textdomain('swiftframework', get_stylesheet_directory().'/language');
    	
    	
    	/* REMOVE PAGE BUILDER ASSETS
    	================================================== */
    	/*
    	*	You can uncomment the line below to remove selected assets from the page builder
    	*/
    	
    	// function spb_remove_assets( $pb_assets ) {
    	//     unset($pb_assets['parallax']);
    	//     return $pb_assets;
    	// }
    	// add_filter( 'spb_assets_filter', 'spb_remove_assets' );	
    
    /* ADD/EDIT PAGE BUILDER TEMPLATES
     ================================================== */
     function custom_prebuilt_templates($prebuilt_templates) {
     
     /*
     * You can uncomment the lines below to remove default templates
     */
     unset($prebuilt_templates['agency-four-home']);
     unset($prebuilt_templates['agency-four-about']);
     
     return $prebuilt_templates;
     
     }
     add_filter( 'spb_prebuilt_templates', 'custom_prebuilt_templates' );
    
    		
    ?>

    And it returns a 500 error
    I passed it into my local site – same issue.

    Any help?

    David

    #254503
    David Martin – Support
    Moderator
    Post count: 20834

    Pretty hard without any form of access or error log.

    – If you enable error reporting in your wp-config.php what is the output? define('WP_DEBUG', true);?
    – Can you access the error logs?

    Thanks.

    #254504
    davidll
    Member
    Post count: 205

    Ok – Its the new swift page builder that is trying to do too much.

    Before: clear, simple:

    Attachments:
    You must be logged in to view attached files.
    #254506
    davidll
    Member
    Post count: 205

    after:

    Attachments:
    You must be logged in to view attached files.
    #254508
    davidll
    Member
    Post count: 205
    This reply has been marked as private.
Viewing 15 posts - 1 through 15 (of 26 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register