Hello,
MslsOptions has a factory that tries to figure out in which content type it is right now. This here should do what you want to archive:
$mslsOption = \lloc\Msls\MslsOptions::create();
$linked_posts = $mslsOption->get_arr();
Cheers!
Hi Dennis,
thank you so much for your help. I’m sorry, I am still learning about code and I I’m certainly doing something wrong here cause it doesn’t work.
I pasted the code that you gave me above, in the document “MultisiteLanguageSwitcher.php”
I tried several locations within the document but none has worked out, it either returns a fatal error or still switches to the homepage instead of the associated page even though an associated page is selected.
Did I understand it right that the code goes into “MultisiteLanguageSwitcher.php” and should work at any given spot?
Sorry for bothering you and thanks for your help 🙂
Please, don’t save any code in the plugin directly.
It depends on what you want to archive: Often is the file functions.php in your theme a good place.
What exactly do you want to do? I ask because you can link the contents in the wp-admin together (using the plugin’s functionality).
Read on here: http://msls.co/
Actually, i think what I`m trying to achieve is quite basic: I want the german Site to link to the associated English one. I did this http://msls.co/user-docs/editing-association-contents.html#status-of-connections already but it always links to the homepage and not the chosen associated page.
Thus, I started searching the support forum if anyone has encountered the same issue.
I reinstalled the whole website including plugins again and now it works perfectly with all published sites and posts 🙂
I’ll take that. Thanks for your help, Dennis. 🙂
Thanks for the update. Very good!