Dennis Ploetner
Forum Replies Created
-
Forum: Plugins
In reply to: [Multisite Language Switcher] I get Fatal ErrorExcellent! Thanks
Forum: Plugins
In reply to: [Multisite Language Switcher] I get Fatal ErrorSeems the PHP Intl extension is missing in your case … I modified that part. Please, let me know!
Forum: Plugins
In reply to: [Multisite Language Switcher] Custom Post Type rewrite / translating slugYou would normally translate the label and the slug for a custom post type but not the post_type_key…
function wporg_custom_post_type() { register_post_type( 'wporg_product', array( 'labels' => array( 'name' => __( 'Products', 'textdomain' ), 'singular_name' => __( 'Product', 'textdomain' ), ), 'public' => true, 'has_archive' => true, 'rewrite' => array( 'slug' => _x( 'products', 'slug', 'textdomain' ), ) ); } add_action( 'init', 'wporg_custom_post_type' );In my example the key ‘wporg_product’ is the same for all installations.
- This reply was modified 6 years, 3 months ago by Dennis Ploetner.
Forum: Plugins
In reply to: [Multisite Language Switcher] Group languages by continentOK let’s see … [email protected]
Forum: Plugins
In reply to: [Multisite Language Switcher] Group languages by continentWhen I asked before “Are those pages tied together?” … the FAQ-page in every country is linked to the others. In the frontend it takes then the current page and looks for the linked translations… it must work because it uses the underlying functionality from the rest of the plugin.
Forum: Plugins
In reply to: [Multisite Language Switcher] Group languages by continentYes, that’s correct.
Forum: Plugins
In reply to: [Multisite Language Switcher] Group languages by continentI tried it a lot of times and it works just fine. I developed the functionality for something my company needed. Just look for the flag in the footer of the page and click on it. It opens a list of other flags where that function is used: https://www.drivek.es/faq/
Forum: Plugins
In reply to: [Multisite Language Switcher] Link pages in draft modeThere is – at the moment – no easy way to override it.
You could use a filter:
http://msls.co/developer-docs/hook-reference.html#msls-meta-box-suggest-args
Forum: Plugins
In reply to: [Multisite Language Switcher] Filter to deactivate hreflang tagsYou could probably work with the blog collection in that case. For all posts and pages for example:
function my_msls_blog_collection( $blogs ) { if ( is_singular() && isset( $blogs[1] ) ) { unset( $blogs[1] ); } return $blogs; } add_filter( 'msls_blog_collection_construct', 'my_msls_blog_collection' );Forum: Plugins
In reply to: [Multisite Language Switcher] Group languages by continentI will check this in the next 2 days…
Forum: Plugins
In reply to: [Multisite Language Switcher] Group languages by continentAre those pages tied together?
Forum: Plugins
In reply to: [Multisite Language Switcher] Group languages by continentHello,
MSLS has the function get_msls_permalink(). You can pass a locale and get the link of the current page/post:
<h4>North America</h4> <ul> <li><a href="<?php echo get_msls_permalink( 'en_US' ); ?>">United States</a></li> <li><a href="<?php echo get_msls_permalink( 'en_CA' ); ?>">Canada</a></li> </ul> <h4>Europe</h4> <ul> <li><a href="<?php echo get_msls_permalink( 'fr_FR' ); ?>">France</a></li> <li><a href="<?php echo get_msls_permalink( 'es_ES' ); ?>">Spain</a></li> <li><a href="<?php echo get_msls_permalink( 'en_GB' ); ?>">United Kingdom</a></li> </ulForum: Plugins
In reply to: [Multisite Language Switcher] Filter to deactivate hreflang tagsSorry, for this. You could try the next one:
https://github.com/lloc/Multisite-Language-Switcher/commit/2c39df1eb454149055a54f6d8c5d352dd4e8ed6f
Forum: Plugins
In reply to: [Multisite Language Switcher] Filter to deactivate hreflang tagsThis commit could probably do the trick: https://github.com/lloc/Multisite-Language-Switcher/commit/d20328f100d7ce41a84983fd3520c44461a57996
Forum: Plugins
In reply to: [MslsMenu] cannot add to primary menuOK for me. Write a mail to [email protected]