New Landing How can we help? Themeforest Theme Support Joyn Swift Page Builder> "Portfolio" does not work with "WPML"

Viewing 15 posts - 1 through 15 (of 21 total)
  • Posted in: Joyn
  • #173314
    mengeco
    Member
    Post count: 558

    Hello,

    Swift Page Builder> “Portfolio” does not work with “WPML”

    The error message :

    Fatal error: Maximum execution time of 60 seconds exceeded in /home/pierreco/public_html/humour/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 0

    Regards

    #173321
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    How can we replicate that?
    Can you also provide us your site url and admin access?

    -Rui

    #173326
    mengeco
    Member
    Post count: 558
    This reply has been marked as private.
    #173481
    mengeco
    Member
    Post count: 558

    if I disable WPML, the SPB portfolio works fine

    Always error : Fatal error: Maximum execution time of 60 seconds exceeded in /home/pierreco/public_html/humour/wp-content/themes/joyn/includes/meta-box/inc/helpers.php on line 278

    As do to WPML works with SPB Portfolio?

    #173483
    mengeco
    Member
    Post count: 558

    Sorry, if I disable WPML, the SPB portfolio still does not work

    #173490
    mengeco
    Member
    Post count: 558

    Perhaps the pb comes from the update Swift Framework.

    When I do the update, the update wheel turns but never stops.

    Attachments:
    You must be logged in to view attached files.
    #173522
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    It seems related to something inside your child theme.
    If you activate the parent theme you will see that it works.

    -Rui

    #173546
    mengeco
    Member
    Post count: 558

    Yes, thanks Rui, le problem is related to function with the display styles in the excerpt of blog posts:

    function improved_trim_excerpt($text) {
        global $post;
        if ( '' == $text ) {
            $text = get_the_content('');
            $text = apply_filters('the_content', $text);
            $text = str_replace(']]>', ']]>', $text);
            $text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);
            $text = strip_tags($text, '<p><a><strong><br /><font><h2><h3><span>');
            $excerpt_length = 80;
            $words = explode(' ', $text, $excerpt_length + 1);
            if (count($words)> $excerpt_length) {
                array_pop($words);
                array_push($words, '[...]');
                $text = implode(' ', $words);
            }
        }
        return $text;
    }
     
    remove_filter('get_the_excerpt', 'wp_trim_excerpt');
    add_filter('get_the_excerpt', 'improved_trim_excerpt');

    Wordpress does not display the styles in the excerpt of blog posts.

    Is there another solution that would allow me to delete my old code?

    #173555
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Not sure about that. Try to comment line 6 and 7.

    -Rui

    #173573
    mengeco
    Member
    Post count: 558

    in function.php, the line 6 an 7 is for a new custom post type, and if I delete the part of style excerpt, The portfolio work.

    The line 6 and 7 :

    6 : register_post_type( ‘avocats’,
    7 : array(

    of code :

    add_action( 'init', 'create_post_type' );
    function create_post_type() {
      register_post_type( 'avocats',
        array(
          'labels' => array(
            'name' => __( 'Avocats' ),
            'singular_name' => __( 'Avocats' )
          ),
          'public' => true
        )
      );
    register_taxonomy( 'statut', 'avocats', array( 'hierarchical' => true, 'label' => 'Statut', 'query_var' => true, 'rewrite' => true ) );
    }
    #173591
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please replace your custom post type code with this code:-

    function sf_avocats_category_register() {
    
            
    
            $args = array(
                "label"             => __( 'Avocats Categories', "swift-framework-admin" ),
                "singular_label"    => __( 'Avocats Category', "swift-framework-admin" ),
                'public'            => true,
                'hierarchical'      => true,
                'show_ui'           => true,
                'show_in_nav_menus' => false,
                'args'              => array( 'orderby' => 'term_order' ),
                'rewrite'           => true,
                'query_var'         => true
            );
    
            register_taxonomy( 'avocats-category', 'avocats', $args );
        }
    
        add_action( 'init', 'sf_avocats_category_register' );
    
    add_action( 'init', 'create_avocats_type' );
    function avocats_post_type() {
      register_post_type( 'avocats',
        array(
          'labels' => array(
            'name' => __( 'Avocats' ),
            'singular_name' => __( 'Avocats' )
          ),
          'public' => true
        )
      );
    }

    Thanks
    Mohammad

    #173755
    mengeco
    Member
    Post count: 558

    Sorry but this code don’t work, error message (see screenshot)

    Attachments:
    You must be logged in to view attached files.
    #173766
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I have corrected the code so please check it.

    function sf_avocats_category_register() {
    
            
    
            $args = array(
                "label"             => __( 'Avocats Categories', "swift-framework-admin" ),
                "singular_label"    => __( 'Avocats Category', "swift-framework-admin" ),
                'public'            => true,
                'hierarchical'      => true,
                'show_ui'           => true,
                'show_in_nav_menus' => false,
                'args'              => array( 'orderby' => 'term_order' ),
                'rewrite'           => true,
                'query_var'         => true
            );
    
            register_taxonomy( 'avocats-category', 'avocats', $args );
        }
    
        add_action( 'init', 'sf_avocats_category_register' );
    
    add_action( 'init', 'create_avocats_type' );
    function create_avocats_type() {
      register_post_type( 'avocats',
        array(
          'labels' => array(
            'name' => __( 'Avocats' ),
            'singular_name' => __( 'Avocats' )
          ),
          'public' => true
        )
      );
    }

    Thanks
    Mohammad

    #173788
    mengeco
    Member
    Post count: 558

    Thanks but if I use my code for style in custom excerpt, it don’t work

    function improved_trim_excerpt($text) {
        global $post;
        if ( '' == $text ) {
            $text = get_the_content('');
            $text = apply_filters('the_content', $text);
            $text = str_replace(']]>', ']]>', $text);
            $text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);
            $text = strip_tags($text, '<p><a><strong><br /><font><h2><h3><span>');
            $excerpt_length = 80;
            $words = explode(' ', $text, $excerpt_length + 1);
            if (count($words)> $excerpt_length) {
                array_pop($words);
                array_push($words, '[...]');
                $text = implode(' ', $words);
            }
        }
        return $text;
    }
     
    remove_filter('get_the_excerpt', 'wp_trim_excerpt');
    add_filter('get_the_excerpt', 'improved_trim_excerpt');
    #173815
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Why do you want to use this custom code? Please explain me and i will give to you exact solution.
    Thanks
    Mohammad

Viewing 15 posts - 1 through 15 (of 21 total)

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

License required for one of the following items
Login and Registration Log in · Register