Forum Replies Created

Viewing 15 replies - 136 through 150 (of 176 total)
  • Thread Starter ekajuan

    (@ekajuan)

    Ups…one little problem. With polylang the Avada search on the frontend becomes unusable. It throws 404 page or just return to the homepage.

    Anyone experiences the same thing?

    Thread Starter ekajuan

    (@ekajuan)

    O.. it works now. Yippy!

    At all, the steps:
    Assuming you have set the language you want to use in Settings > languages > languages tab.
    And using this plugin: https://downloads.www.ads-software.com/plugin/polylang.zip

    1. Click: Settings > languages > Setting tab
    2. Look at the URL modifications
    change from:
    The language is set from content
    to:
    The language is set from the directory name in pretty permalinks
    3. Save changes
    4. For each language you use, set the theme options.
    Look at the top bar: Show All Languages. Choose the language before setting the theme options.

    Thanks a lot Chouby.

    O yea, will it influence the SEO since my blog post url has extra /id/ or /en/, for example:
    previous
    dapur-uang.com/just-an-example
    now
    dapur-uang.com/id/just-an-example

    Thread Starter ekajuan

    (@ekajuan)

    Yup, not yet working with the current Avada 3.7.
    @chouby: would it be better if I send you the theme?

    Thread Starter ekajuan

    (@ekajuan)

    I got better solution, change this instead:
    wp-content/themes/Avada/admin/functions/functions.admin.php

    find:

    function of_get_options($key = null, $data = null) {
        if ($key != null) { // Get one specific value
            //$data = get_theme_mod($key, $data);
        } else { // Get all values
            $data = get_option(OPTIONS);
        }
    
        return $data;
    }

    Change:

    get_option(OPTIONS)

    to:

    get_option(Avada_options_id)

    id is your default language code.

    The problem with the previous solution is the menu will get messed up.

    Thread Starter ekajuan

    (@ekajuan)

    Okay, I write this to anyone that may experience similar problem with Avada 3.6.2 and Polylang.

    I did some digging, and I figured out a hack. I don’t know what the consequence will be, but the theme options saving is now working in my language.

    My language is Indonesia. So the modifications is saved into Avada_options_id (please read my story above)

    To prevent the modification to be saved into Avada_options_id find this file:

    wp-content\themes\Avada\admin\index.php

    Find this part of code:

    elseif( ICL_LANGUAGE_CODE == 'all' ) {
    		if( defined('ICL_SITEPRESS_VERSION') ) {
    			$lang = '_' . $sitepress->get_default_language();
    			if( $sitepress->get_default_language() == 'en' ) {
    				$lang = '';
    			}
    		} elseif( function_exists( 'pll_default_language' ) ) {
    			$lang = '_' . pll_default_language('slug');
    			if( pll_default_language('slug') == 'en' ) {
    				$lang = '';
    			}

    change en to id, or whatever your language code name you setup with polylang. It’s case sensitive.

    And I think this piece of code is the one responsible for the creation of Avada_options_id:

    if(ICL_LANGUAGE_CODE != 'en' && ICL_LANGUAGE_CODE != 'all' && array_key_exists(ICL_LANGUAGE_CODE, icl_get_languages('skip_missing=N'))) {
    		$lang = '_'.ICL_LANGUAGE_CODE;
    		if(!get_option($theme_name.'_options'.$lang)) {
    			update_option($theme_name.'_options'.$lang, get_option($theme_name.'_options'));
    		}

    @chouby, maybe what’s inside index.php file will interest you or at least just for your information. And you’re right it has something to do with WPML:

    <?php
    /*
    Title		: SMOF
    Description	: Slightly Modified Options Framework
    Version		: 1.5.1
    Author		: Syamil MJ
    Author URI	: https://aquagraphite.com
    License		: GPLv3 - https://www.gnu.org/copyleft/gpl.html
    
    Credits		: Thematic Options Panel - https://wptheming.com/2010/11/thematic-options-panel-v2/
    		 	  Woo Themes - https://woothemes.com/
    		 	  Option Tree - https://www.ads-software.com/extend/plugins/option-tree/
    
    Contributors: Syamil MJ - https://aquagraphite.com
    			  Andrei Surdu - https://smartik.ws/
    			  Jonah Dahlquist - https://nucleussystems.com/
    			  partnuz - https://github.com/partnuz
    			  Alex Poslavsky - https://github.com/plovs
    			  Dovy Paukstys - https://simplerain.com
    */
    
    /**
     * Definitions
     *
     * @since 1.4.0
     */
    $theme_version = '';
    $smof_output = '';
    
    if( function_exists( 'wp_get_theme' ) ) {
    	if( is_child_theme() ) {
    		$temp_obj = wp_get_theme();
    		$theme_obj = wp_get_theme( $temp_obj->get('Template') );
    	} else {
    		$theme_obj = wp_get_theme();
    	}
    
    	$theme_version = $theme_obj->get('Version');
    	$theme_name = $theme_obj->get('Name');
    	$theme_uri = $theme_obj->get('ThemeURI');
    	$author_uri = $theme_obj->get('AuthorURI');
    }
    
    define( 'SMOF_VERSION', '1.5.1' );
    
    if( !defined('ADMIN_PATH') )
    	define( 'ADMIN_PATH', get_template_directory() . '/admin/' );
    if( !defined('ADMIN_DIR') )
    	define( 'ADMIN_DIR', get_template_directory_uri() . '/admin/' );
    
    define( 'ADMIN_IMAGES', ADMIN_DIR . 'assets/images/' );
    
    define( 'LAYOUT_PATH', ADMIN_PATH . 'layouts/' );
    define( 'THEMENAME', $theme_name );
    /* Theme version, uri, and the author uri are not completely necessary, but may be helpful in adding functionality */
    define( 'THEMEVERSION', $theme_version );
    define( 'THEMEURI', $theme_uri );
    define( 'THEMEAUTHORURI', $author_uri );
    
    // Avada Edit
    $lang = '';
    if(defined('ICL_LANGUAGE_CODE')) {
    	if( defined('ICL_SITEPRESS_VERSION') ) {
    		global $sitepress;
    	}
    	if(ICL_LANGUAGE_CODE != 'en' && ICL_LANGUAGE_CODE != 'all' && array_key_exists(ICL_LANGUAGE_CODE, icl_get_languages('skip_missing=N'))) {
    		$lang = '_'.ICL_LANGUAGE_CODE;
    		if(!get_option($theme_name.'_options'.$lang)) {
    			update_option($theme_name.'_options'.$lang, get_option($theme_name.'_options'));
    		}
    	} elseif( ICL_LANGUAGE_CODE == 'all' ) {
    		if( defined('ICL_SITEPRESS_VERSION') ) {
    			$lang = '_' . $sitepress->get_default_language();
    			if( $sitepress->get_default_language() == 'en' ) {
    				$lang = '';
    			}
    		} elseif( function_exists( 'pll_default_language' ) ) {
    			$lang = '_' . pll_default_language('slug');
    			if( pll_default_language('slug') == 'en' ) {
    				$lang = '';
    			}
    		}
    	} else {
    		$lang = '';
    	}
    }
    // End Avada Edit
    
    define( 'OPTIONS', $theme_name . '_options' . $lang );
    define( 'BACKUPS', $theme_name . '_backups' . $lang );
    
    /**
     * Required action filters
     *
     * @uses add_action()
     *
     * @since 1.0.0
     */
    //if (is_admin() && isset($_GET['activated'] ) && $pagenow == "themes.php" ) add_action('admin_head','of_option_setup');
    add_action('admin_head', 'optionsframework_admin_message');
    add_action('admin_init','optionsframework_admin_init');
    add_action('admin_menu', 'optionsframework_add_admin');
    
    /**
     * Required Files
     *
     * @since 1.0.0
     */
    require_once ( ADMIN_PATH . 'functions/functions.load.php' );
    require_once ( ADMIN_PATH . 'classes/class.options_machine.php' );
    
    /**
     * AJAX Saving Options
     *
     * @since 1.0.0
     */
    add_action('wp_ajax_of_ajax_post_action', 'of_ajax_callback');
    Thread Starter ekajuan

    (@ekajuan)

    WPML is a commercial plugin. It is not bundled with Avada theme. People have to purchase separately.
    That means my theme currently is not equipped with WPML.

    I think the changelog just mean Avada is WPML compatible as written in this doc:
    https://theme-fusion.com/avada-doc/translations/using-wpml-avada/

    Quote:

    We’ve worked directly with the WPML team to make Avada compatible with the popular WPML plugin.

    I don’t know, maybe Avada has something in the way they write the code makes their variable get influenced by Polylang.
    Since you are a developer, maybe you have the experiences and the knowledge to analyze or predict the problem. I’m just a blogger.

    But if you say there’s no problem. Well ok. No problem.

    Thread Starter ekajuan

    (@ekajuan)

    I have contacted them first. They don’t have multiligual feature. They suggest WPML for multilingual instead.

    The problem disappears, if Polylang plugin is turned off.

    I think it’s not compatible with the latest WP4.

    Did you enable CDN cloudflare extension in w3tc?

    This article from Cloudflare mentions something about not to use both minify in w3tc and cloudflare

    https://support.cloudflare.com/hc/en-us/articles/200169756-Can-I-use-WordPress-caching-plugins-like-Super-Cache-or-W3-Total-Cache-W3TC-with-CloudFlare-

    I don’t understand the detail, but after I turned off the cloudflare extension, I can tick the enable minify box again.

    Thread Starter ekajuan

    (@ekajuan)

    Nope that doesn’t work.

    So I selected manual minify, and choose which files to be minified. That works

    I had the same problem. It turns out in my case the cause is because I turned on the extension CDN Cloudflare.
    I’m not to savy about this thing, but it seems this article from Cloudflare explains it

    Something to do with don’t enable both minify in W3tc and Cloudflare

    For image optimizing try plugin wp smush-it. I use it and pass the page speed test from Google.
    It will automatically optimize pics every time you upload pics.

    I don’t think W3TC suppose to optimize images.

    Thread Starter ekajuan

    (@ekajuan)

    Just disable the database cache temporarily.

    Thread Starter ekajuan

    (@ekajuan)

    Well, after doing some search, it turns out that the:
    class=”lazy-load-youtube preview-youtube”
    is belong to the preivous plugin: Lazy Load for Videos, which I previously tested.

    So it’s back to normal now.

    Thread Starter ekajuan

    (@ekajuan)

    I have virtue toolkit installed, but the problem already exist before the installation.

    An example link : https://feju-fashion.com/shop-till-you-drop-di-dongdaemun-pusatnya-fast-fashion-korea/

Viewing 15 replies - 136 through 150 (of 176 total)