Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter djalfe

    (@djalfe)

    Hi there
    sorry about the long response, Christmas has taking my time 🙂

    I finally got around to trying out msls_get_post(id), which gives me opposite IDs of the language I’m in.
    I need id or WPPost content for current language.

    I currently have 2 languages, Danish and English. Here I have created 2 Footer custom post Type, related to each other

    Footer [en-UK] => id:33
    Footer [da-DK] => id:126

    For example, when I request msls for id in current language, based on my record id:33. Then I would like to receive relationsid or WPPost to be able to insert content from the Footer that fits the current language.

    MSLS get based on id:33
    if (output for id:33 do NOT have same language as current language)
    { find relations to id:33 and output with same as current language like id:126 if danish }
    else
    { output id:33 }

    Does that make sense??

    Thread Starter djalfe

    (@djalfe)

    Hi Dennis It’s not quite what I’m looking for, unfortunately.

    I have created a custom post type I call “Resources”.
    I use it to store Static content, such as Footer, script connection for e.g. google maps or embedded third party products.

    Using MSLS, my thought was to retrieve e.g. footer into theme part “parts/footer.php” on my theme.

    My thought was to be able to query MSLS for related IDs or post content in current language, based on ID or slug.

    Does it make sense?

    Thread Starter djalfe

    (@djalfe)

    Hello Dennis
    It is me who is not clear enough with what I am asking for.

    I would like to retrieve data from my custom post type programmatically
    I have played a bit with msls_get_post(int id), as it is the only one I have found that gives me relations for my custom type post.

    <?php

    $msls_blog = msls_get_post([postid]);
    print_r($msls_blog);

    ?>

    Think there is definitely a proper way to retrieve my post type, in current language.
    Meaby there is a way with a hook or some kind ??

    Thanks
    // Allan

Viewing 3 replies - 1 through 3 (of 3 total)