WordPress.org

Ready to get started?Download WordPress

Forums

012 Ps Multi Languages
How to hide something in different languages? (4 posts)

  1. PixArt
    Member
    Posted 1 year ago #

    Hi, this plugin is fabulous, but i have one question. How can I hide something in translated page? For eg.: On my default language (eng) I have menu with 4 positions: 'home', 'about us', 'products', 'contact' , but in translation (de) i would like to hide 'contact' from menu. How can I do this?

    http://wordpress.org/extend/plugins/012-ps-multi-languages/

  2. Wang Bin
    Member
    Plugin Author

    Posted 1 year ago #

    Hello PixArt
    The display of the menu what do you use?
    wp_nav_menu
    OR
    wp_page_list
    Please tell me

    And
    Please tell methe URL of the site.

  3. PixArt
    Member
    Posted 1 year ago #

    I used wp_nav_menu . I resolved this issue with simple js function:

    $(document).ready(function () {
    	if ( $('html').attr('lang') == 'en-US' ) {
    		 $("#menu-item-80, #menu-item-70, #menu-item-81").hide();
    	};
    });

    For me it's sufficient, but you can also add your resolve.

  4. Wang Bin
    Member
    Plugin Author

    Posted 1 year ago #

    If I am, you might use a regular expression of PHP,
    I think this good.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic