jappie11
Forum Replies Created
-
Forum: Plugins
In reply to: [Multisite Language Switcher] Sort orderIdeally the output would be the same as with the_MSLS, so including the divs below. Also I noticed that the function example output the get_the_msls to the navigation menu, which is not what I want since it should have it’s own DIV.
add_filter( 'wp_nav_menu_items', 'my_custom_language_menu', 10, 2 );
How would I change the add_filter above to use get_the_msls with the divs I need in my header?
The desired output is as follows:
<div id="language_selector"><ul class="translation_links"> <li><a href="#" title="fr"><img width="16" height="11" src=".../wp-content/plugins/multisite-language-switcher/flags/fr.png" alt="fr_FR"></a></li> <li><a href="#/en" title="en"><img width="16" height="11" src=".../wp-content/plugins/multisite-language-switcher/flags/us.png" alt="us"></a></li> <li><a href="#/ar" title="ar"><img width="16" height="11" src=".../wp-content/plugins/multisite-language-switcher/flags/ar.png" alt="ar"></a> </li> </div>
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
Forum: Plugins
In reply to: [Multisite Language Switcher] Sort orderHi,
Not sure but maybe I lack in understanding here, I was hoping to do something like this
foreach ( array( 1, 2, 3) as $id ) { //array('orderby' => 'blog_id', 'order' => 'ASC'); $arr[$id] = get_blog_details( $id ); } //$arr = array('orderby' => 'blog_id', 'order' => 'ASC' ); return $arr;
Note: the commented out lines are attempts in vain to get the sort order optimized.
In terms of using get_the_msls(), how would you go about to create a fully customized language switcher? How do I get the flags,
li>items, etc. and most importantly, how do I set the sort order?Thanks in advance for your help!
Cheers JP
Hi there,
I was struggling with the same issue (WordPress Multisite with MSLS for various languages) and made one discovery. I haven’t tested this extensively so I’m not quite sure if this is “reproducable” or if it can help others but…
It seems to me that part of the problem resulted from the permalink structure of your WordPress. Furthermore whenever more than one category was selected for a particular post LinkedIn would have difficulty interpreting the link.
The solution I found to work was to de-activate all categories but one (Additional note: for some reason it seems that it’s best to not choose “news” as the active category) and click update. Then try and copy-paste the link in the LinkedIn update field.
If the link is interpreted (“swallowed”) correctly by LinkedIn, you can post the update and if this is important choose to re-activate other categories on your WordPress post.
HTH, JP