• Resolved salesfunnelguy

    (@akshayrox123)


    Hello,
    I am a premium user for this plugin. Unfortunately have to write here as your premium support is bad as hell. Every day a delay of reply from your team cost my site.
    Anyhow.
    My question is, If i want to disable a complete template, how to achieve that? I want to block translatepress on my product pages. As in, there shouldn’t be hreflang tag on those pages too. How to do that?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Alex

    (@alexcozmoslabs)

    Hello,

    Our support time was affected due to the Winter Holiday, therefore the response time was longer.
    SO you want to have those pages just in the default langauge?
    You can exclude a page from translation using a bit of coding:

    1. Create an empty plugin like this: https://gist.github.com/sareiodata/76f701e01db6685829db

    2.Add (and edit the arrays with your page slug that you want to be excluded) the following code to the end of it:

    add_action( 'plugins_loaded', 'trpc_exclude_tp_from_pages', -1 );
    function trpc_exclude_tp_from_pages(){
        $do_not_translate_path = array('contact');
    	$do_not_translate_path = array('home');
    	$do_not_translate_path = array('test-page-page');
    
        foreach ( $do_not_translate_path as $path ){
            if ( !empty($path) && strpos($_SERVER['REQUEST_URI'], untrailingslashit($path)) !== false ){
                add_filter( 'trp_allow_tp_to_run', function(){return false; } );
            }
        }
    }

    3. Install this plugin via FTP (copy it inside wp-content/plugins) or create a zip archive with it and install it via the WordPress plugin upload functionality

    Best Regards,

    • This reply was modified 3 years, 11 months ago by Alex.
Viewing 1 replies (of 1 total)
  • The topic ‘Disable All product pages or all category pages from translation?’ is closed to new replies.