Forum Replies Created

Viewing 9 replies - 571 through 579 (of 579 total)
  • Thanks!

    Ні.
    1. This it not bug. Plugin not support separate menu items for each language. As solution, you can create different menus for differrent language. In template check current language and display needed menu. Use function wpm_get_user_language()

    2. The plugin do not support different slug for each language. And in the near future it is not planned.

    Hi.
    I need more info about your problem.

    VaLeXaR

    (@valexar)

    Yes. Ofcourse.
    I waited as long update qTranslate-X. Even brought changes to qTranslate-X repository on GitHub, because it is not compatible with the REST-API and many other errors. But seems the author of qTranslate-X no longer engaged in support of own plugins.
    That is why I decided to write another plugin and take into account my needs, which is lacking in other plugins.
    Therefore, the basic configuration is through configuration files and filters. You can not make all the settings in the admin area, as most third-party plugins require individual adaptation.
    The only thing missing, it WordPress filter function get_post. They could then make it possible to integrate with third-party plugins 99%, that using a standard table WordPress.
    This plugin I have done all that can be drawn from WordPress. If there will be ideas or questions, please contact. I will be glad to help.

    P.S. Sorry for my English πŸ™‚

    Thread Starter VaLeXaR

    (@valexar)

    If option page slug is not “admin.php”, ACF QTranslate not working.

    Thread Starter VaLeXaR

    (@valexar)

    Thread Starter VaLeXaR

    (@valexar)

    Here is function which get shortcode.

    function themo_do_shortocde_button($postid='',$key='',$return_shortcode=false, $extra_classes='',$serial=false){
    
        if(isset($serial) && $serial > ""){
            $serial = '_'.$serial;
        }else{
            $serial = false;
        }
    
    	$show_button = "";
    	$button_text = "";
    	$button_link = "";
    	$button_style = "";
    	$button_link_target = "";
        $button_img_ID = "";
        $productID = "";
        $product_sku = "";
    
    	if($postid=='') {
    		$postid=get_the_ID();
    	}
    
    	if(is_array($postid)){
    		if(isset($postid[$key.'_show_button'.$serial])){$show_button = $postid[$key.'_show_button'.$serial];}
    		if(isset($postid[$key.'_button_text'.$serial])){$button_text = $postid[$key.'_button_text'.$serial];}
    		if(isset($postid[$key.'_button_link'.$serial])){$button_link = $postid[$key.'_button_link'.$serial];}
    		if(isset($postid[$key.'_button_style'.$serial])){$button_style = $postid[$key.'_button_style'.$serial];}
    		if(isset($postid[$key.'_button_link_target'.$serial])){$button_link_target = $postid[$key.'_button_link_target'.$serial];}
            if(isset($postid[$key.'_button_img_ID'.$serial])){$button_img_ID = $postid[$key.'_button_img_ID'.$serial];}
            if(isset($postid[$key.'_productID'.$serial])){$productID = $postid[$key.'_productID'.$serial];}
            if(isset($postid[$key.'_product_sku'.$serial])){$product_sku = $postid[$key.'_product_sku'.$serial];}
    	}else{
    		$show_button = get_post_meta($postid, $key.'_show_button'.$serial, true );
    		$button_text = get_post_meta($postid, $key.'_button_text'.$serial, true );
    		$button_link = get_post_meta($postid, $key.'_button_link'.$serial, true );
    		$button_style = get_post_meta($postid, $key.'_button_style'.$serial, true );
    		$button_link_target = get_post_meta($postid, $key.'_button_link_target'.$serial, true );
            $button_img_ID = get_post_meta($postid, $key.'_button_img_ID'.$serial, true );
            $productID = get_post_meta($postid, $key.'_productID'.$serial, true );
            $product_sku = get_post_meta($postid, $key.'_product_sku'.$serial, true );
    	}
    
    	if(isset($button_link_target) && is_array($button_link_target)){
    		if($button_link_target[0] > ""){
    			$button_link_target = $button_link_target[0];
    		}
    	}
    	if($show_button == 1){
            if(isset($product_sku) && $product_sku > '') { // If using product Sku
                $output = "[add_to_cart sku='" . $product_sku . "' class='th-btn a2c-btn a2c-".$button_style."' show_price='false' style='']";
            }elseif(isset($productID) && $productID != 0){ // if using product ID
                $output = "[add_to_cart id=".$productID." class='th-btn a2c-btn a2c-".$button_style."' show_price='false' style='']";
            }elseif(isset($button_img_ID) && $button_img_ID != 0){ // if using product image.
                $img_src = themo_return_metabox_image($button_img_ID, null, "themo_brands", true, $alt);
                $output = '<a href='.esc_url($button_link).' target="'.$button_link_target.'" title="'.$button_text.'" class="th-btn btn-image">';
                $output .= '<img src="'. esc_url($img_src). '" alt="'. esc_attr($alt).'">';
                $output .= '</a>';
            }else{
                $output = '[button text="'.$button_text.'" url="'.$button_link.'"  type="'.$button_style.'" target="'.$button_link_target.'" extra_classes="th-btn '.$extra_classes.'"]';
            }
    
            // Return or run shortcode.
            if($return_shortcode){
                return $output;
            }else{
                echo do_shortcode($output);
            }
    
    	}else{
    		return false;
    	}
    }
    Thread Starter VaLeXaR

    (@valexar)

    Hi.
    The shortcode is [add_to_cart id=ID class=’th-btn a2c-btn a2c’ show_price=’false’ style=”]
    This shortcode calling in Stratus Theme.

    Thread Starter VaLeXaR

    (@valexar)

Viewing 9 replies - 571 through 579 (of 579 total)