WordPress.org

Ready to get started?Download WordPress

Forums

Bogo
[resolved] query_posts issue (2 posts)

  1. wgstjf
    Member
    Posted 1 year ago #

    Loving the plugin but have one minor issue.

    On the homepage I display content from two other pages as well as the content from the homepage.

    I am currently doing this...

    $ids = array(23);
    query_posts(array('post__in' => $ids,'post_type'=> 'page'));

    When I switch language it doesn't switch these additional pages content to the other language.

    I have tried this...

    if ($locale=='es_ES') {
    $ids = array(101);
    } else {
    $ids = array(23);
    }
    query_posts(array('post__in' => $ids,'post_type'=> 'page'));

    Which doesn't work..

    and this....

    $ids = array(23);
    if ($locale=='es_ES') {
    query_posts(array('post__in' => $ids,'post_type'=> 'page','lang' =>'es_ES'));
    }

    Any help would be greatly appreciated.

    Cheers,

    Will

    http://wordpress.org/extend/plugins/bogo/

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 1 year ago #

    Where does the $locale come from? Try replace it with get_locale() like this:

    if (get_locale() == 'es_ES') {

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.