Forum Replies Created

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • in reply to: Creating new element with multiple content WYSIWYG editors #1141322

    Hi Nikko

    Thanks for the info. This was unfortunately also what we concluded, that it would require extensive modifications. But I hoped you guys might’ve had an “easier” solution to it.

    Thank you for looking into it :-)

    Kind Regards
    Yan

    in reply to: Creating new element with multiple content WYSIWYG editors #1141036

    Mjello? :-) Have you had time to look at this one? :-)

    in reply to: Creating new element with multiple content WYSIWYG editors #1140158

    Hi Nikko

    Thanks for looking into this, however I think you’re missing the point here and please try too test it again :-)

    Here’s a step-by-step
    * Open the element
    * Enter some content, also links, H-tags, etc. into the content editors using the Visual Editor
    * Save the element
    * Re-open the element

    You’ll see that the Visual Editor now contains the HTML-version of the previously entered content.

    This is the problem, when reopening the element the content is then displayed as HMTL and then switching to the Text/HTML mode then converts it to a html_encoded version of the content.

    Kind Regards
    Yan

    in reply to: Creating new element with multiple content WYSIWYG editors #1139401
    This reply has been marked as private.
    in reply to: Creating new element with multiple content WYSIWYG editors #1139338

    No answers? ;-) Kind of disappointing with 50+ Enfold sites running.. :-)

    in reply to: WooCommerce Terms shown twice #816335

    And if you want to fix it with a more clean approach through a filter, you can use this piece of code in functions.php

    add_filter('woocommerce_format_content', 'yanco_remove_inline_terms', 10, 2);
    function yanco_remove_inline_terms( $apply_filters, $raw_string ) {
    	if( is_checkout() ) {
    		return '';
    	}
    	return $apply_filters;
    }

    And if you want to fix it with a more clean approach through a filter, you can use this piece of code in functions.php

    add_filter('woocommerce_format_content', 'yanco_remove_inline_terms', 10, 2);
    function yanco_remove_inline_terms( $apply_filters, $raw_string ) {
    	if( is_checkout() ) {
    		return '';
    	}
    	return $apply_filters;
    }
    • This reply was modified 7 years, 4 months ago by yanknudtskov.

    The problem is not with Enfold, but rather with WooCommerce 3.1.0

    In the changelog (https://github.com/woocommerce/woocommerce/blob/master/CHANGELOG.txt) they introduced this:

    * Feature – Display (toggle-able) terms inline on the checkout rather than showing a link.

    I can’t seem to find where the toggle is, but the code change can be found here on line 17
    https://github.com/woocommerce/woocommerce/blob/master/templates/checkout/terms.php

    To avoid the issue, download the terms.php and upload it in /theme_name/woocommerce/checkout/terms.php and change line 17 to
    $terms_content = “”;

    in reply to: WooCommerce Terms shown twice #816327

    The problem is not with Enfold, but rather with WooCommerce 3.1.0

    In the changelog (https://github.com/woocommerce/woocommerce/blob/master/CHANGELOG.txt) they introduced this:

    * Feature – Display (toggle-able) terms inline on the checkout rather than showing a link.

    I can’t seem to find where the toggle is, but the code change can be found here on line 17
    https://github.com/woocommerce/woocommerce/blob/master/templates/checkout/terms.php

    To avoid the issue, download the terms.php and upload it in /theme_name/woocommerce/checkout/terms.php and change line 17 to
    $terms_content = “”;

    in reply to: Magazine Content Element with Custom Post Types #534051

    I’ve just investigated further and I realised it’s my mistake >.<

    I hadn’t added any entries into the new taxonomy, hence the Magazine element didn’t find any either. Once I added entries, it started showing.

    Thank you for the help! Have a great day and sorry for the inconvenience!

    in reply to: Magazine Content Element with Custom Post Types #533563

    Hmm that’s quite strange.

    I manually created the CPT and Taxonomy for the CPT with the code posted below.

    When I edit the magazine element, I only see the option to choose from ‘categories’ not one for any other.

    <?php
    
    /**
     * Add Taxonomy for Ugekurser
     */
    
    if ( ! function_exists( 'ugekurser_taxonomy' ) ) {
    	// Register Custom Taxonomy
    	function ugekurser_taxonomy() {
    
    		$labels = array(
    			'name'                       => _x( 'Ugekursus Kategorier', 'Taxonomy General Name', 'brandbjerg_theme' ),
    			'singular_name'              => _x( 'Ugekursus Kategori', 'Taxonomy Singular Name', 'brandbjerg_theme' ),
    			'menu_name'                  => __( 'Ugekursus Kategorier', 'brandbjerg_theme' ),
    			'all_items'                  => __( 'Alle Ugekursus Kategorier', 'brandbjerg_theme' ),
    			'parent_item'                => __( 'Forældre Ugekursus Kategori', 'brandbjerg_theme' ),
    			'parent_item_colon'          => __( 'Forældre Ugekursus Kategori:', 'brandbjerg_theme' ),
    			'new_item_name'              => __( 'Ny Ugekursus Kategori', 'brandbjerg_theme' ),
    			'add_new_item'               => __( 'Tilføj Ny Ugekursus Kategori', 'brandbjerg_theme' ),
    			'edit_item'                  => __( 'Redigér Ugekursus Kategori', 'brandbjerg_theme' ),
    			'update_item'                => __( 'Opdatér Ugekursus Kategori', 'brandbjerg_theme' ),
    			'view_item'                  => __( 'Se Ugekursus Kategori', 'brandbjerg_theme' ),
    			'separate_items_with_commas' => __( 'Adskil med kommaer', 'brandbjerg_theme' ),
    			'add_or_remove_items'        => __( 'Tilføj eller fjern ugekursus kategorier', 'brandbjerg_theme' ),
    			'choose_from_most_used'      => __( 'Vælg fra de mest anvendte ugekursus kategorier', 'brandbjerg_theme' ),
    			'popular_items'              => __( 'Poplære ugekursus kategorier', 'brandbjerg_theme' ),
    			'search_items'               => __( 'Søg Ugekursus Kategori', 'brandbjerg_theme' ),
    			'not_found'                  => __( 'Intet Fundet', 'brandbjerg_theme' ),
    			'items_list'                 => __( 'Ugekursus Kategori Liste', 'brandbjerg_theme' ),
    			'items_list_navigation'      => __( 'Ugekursus Kategori Liste Navigation', 'brandbjerg_theme' ),
    		);
    		$args = array(
    			'labels'                     => $labels,
    			'hierarchical'               => false,
    			'public'                     => true,
    			'show_ui'                    => true,
    			'show_admin_column'          => true,
    			'show_in_nav_menus'          => true,
    			'show_tagcloud'              => true,
    		);
    		register_taxonomy( 'ugekurser', array( 'ugekursus' ), $args );
    
    	}
    	add_action( 'init', 'ugekurser_taxonomy', 0 );
    }
    
    /**
     * Add Custom Post Type for Ugekursus
     */
    
    if ( ! function_exists('ugekursus_post_type') ) {
    
    	// Register Custom Post Type
    	function ugekursus_post_type() {
    
    		$labels = array(
    			'name'                  => _x( 'Ugekurser', 'Post Type General Name', 'brandbjerg_theme' ),
    			'singular_name'         => _x( 'Ugekursus', 'Post Type Singular Name', 'brandbjerg_theme' ),
    			'menu_name'             => __( 'Ugekurser', 'brandbjerg_theme' ),
    			'name_admin_bar'        => __( 'Ugekurser', 'brandbjerg_theme' ),
    			'parent_item_colon'     => __( 'Forældre Ugekursus:', 'brandbjerg_theme' ),
    			'all_items'             => __( 'Alle Ugekurser', 'brandbjerg_theme' ),
    			'add_new_item'          => __( 'Tilføj Nyt Ugekursus', 'brandbjerg_theme' ),
    			'add_new'               => __( 'Tilføj Ugekursus', 'brandbjerg_theme' ),
    			'new_item'              => __( 'Nyt Ugekursus', 'brandbjerg_theme' ),
    			'edit_item'             => __( 'Redigér Ugekursus', 'brandbjerg_theme' ),
    			'update_item'           => __( 'Opdatér Ugekursus', 'brandbjerg_theme' ),
    			'view_item'             => __( 'Se Ugekursus', 'brandbjerg_theme' ),
    			'search_items'          => __( 'Søg Ugekursus', 'brandbjerg_theme' ),
    			'not_found'             => __( 'Intet Fundet', 'brandbjerg_theme' ),
    			'not_found_in_trash'    => __( 'Intet fundet i papirkurven', 'brandbjerg_theme' ),
    			'items_list'            => __( 'Ugekursus Liste', 'brandbjerg_theme' ),
    			'items_list_navigation' => __( 'Ugekusus Liste Navigation', 'brandbjerg_theme' ),
    			'filter_items_list'     => __( 'Filtrér Ugekurser', 'brandbjerg_theme' ),
    		);
    		$args = array(
    			'label'                 => __( 'Ugekursus', 'brandbjerg_theme' ),
    			'description'           => __( 'Ugekursus Beskrivelse', 'brandbjerg_theme' ),
    			'labels'                => $labels,
    			'supports'              => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats', ),
    			'taxonomies'            => array( 'ugekurser' ),
    			'hierarchical'          => true,
    			'public'                => true,
    			'show_ui'               => true,
    			'show_in_menu'          => true,
    			'menu_position'         => 5,
    			'menu_icon'             => 'dashicons-calendar-alt',
    			'show_in_admin_bar'     => true,
    			'show_in_nav_menus'     => true,
    			'can_export'            => true,
    			'has_archive'           => true,		
    			'exclude_from_search'   => false,
    			'publicly_queryable'    => true,
    			'capability_type'       => 'page',
    		);
    		register_post_type( 'ugekursus', $args );
    
    	}
    	add_action( 'init', 'ugekursus_post_type', 0 );
    }
Viewing 11 posts - 1 through 11 (of 11 total)