• Hi,

    i currently having problems with the blog index page where i’m loading the wordpress posts via do_shortcode:

    echo do_shortcode('[ajax_load_more container_type="div" posts_per_page="6" post_type="post" scroll="false" progress_bar="true" category="' . $cat . '"]');

    On the english version of my page your plugins still loads the default language (german)!

    In the past this works… but since a view weeks, month or more (i’m not sure because i recognised it last week) it only shows the default language posts.

    Could you give me some advice how to fix this.
    best regards robert

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Darren Cooney

    (@dcooney)

    Hi @neueweide
    WPML support should be baked into Ajax Load More so I’m surprised you’re having this issue.

    Do you currently have any english posts? and is there another page where this functionality is working correctly?

    Thread Starter neueweide

    (@neueweide)

    Yes i saw it in many examples and stackoverflow discussions…
    yes i have english content… you can check this when you click on a news item and then click the language switcher in the header you will be able to switch between the same news item in german or english.

    when i insert this code above the do_shortcode line:

    $args = array(
    	'numberposts' => 10
    );
    $latest_posts = get_posts( $args );
    print_r($latest_posts);

    it will list me the english post list.

    this is really strange…!?

    Plugin Author Darren Cooney

    (@dcooney)

    I wonder if it’s something to do with this being the blog page.
    Can you try the shortcode elsewhere on a standard en page?

    • This reply was modified 3 years, 10 months ago by Darren Cooney.
    Thread Starter neueweide

    (@neueweide)

    hi
    yes the news page is a static page assigned as blog page.
    i will try on a regualr page…
    will respond soon!

    best robert

    Thread Starter neueweide

    (@neueweide)

    hi hopefully my delay isn’t interupting our support process.
    i testet it and no it also does not seem to work on a standard blog page.
    It has some weird effects if it is added to stanrad page classic editor (get_the_title() and get_the_excerpt() worked here but get_the_permalink() gave me the ulr of the main language and not of the current language).

    In the end i figured it out and found it was all caused by a single plugin called: ”
    All 404 Redirect to Homepage”.

    We installed this plugin a view years ago, it had that time an entry in the official WordPress Plugin repository. But the entry seems not to exist there anymore ??

    Found the creators website here: https://www.clogica.com/404-redirection-to-homepage-wordpress-plugin.htm

    Simple solution i deleted this plugin ??

    thanks for your time and best
    robert

    • This reply was modified 3 years, 8 months ago by neueweide.
    • This reply was modified 3 years, 8 months ago by neueweide.
    • This reply was modified 3 years, 8 months ago by neueweide.
    Thread Starter neueweide

    (@neueweide)

    ouh now i have the situation it works when i’m logged in to the admin otherwise i have the same weird behaviour like mentioned before… ??!

    i have to check now if there is any server cache that still delivers the old templates and old database stuff…

    does your plugin uses any caching techniques? Can i empty them anywhere?

    • This reply was modified 3 years, 8 months ago by neueweide.
    • This reply was modified 3 years, 8 months ago by neueweide.
    • This reply was modified 3 years, 8 months ago by neueweide.
    • This reply was modified 3 years, 8 months ago by neueweide.
    Plugin Author Darren Cooney

    (@dcooney)

    @neueweide no, the plugin does not use a caching technique. Fingers crossed you can solve this.

    Thread Starter neueweide

    (@neueweide)

    Hi seems your finger crossing does not help me out ??

    I became a feedback by the provider that they hadn’t found any cach problem in their environment. Now i’m back to you… this is really strange isn’t it?

    Can you look at this URL here: https://afinum.de/en/news/
    If the News -Title and -Excerpts are in german the problem still exists .(

    I deactivated all plugins (except Classic Editor, Advanced Custom Fields and WPML and Ajax Load More) and the problem still remains…

    I’m just thinking bout initiating a fresh install to test it in a very basic environment…

    hm ha
    robert

    Plugin Author Darren Cooney

    (@dcooney)

    I’m really not sure. I can see on the EN site that lang=”en” is being passed into the query but it’s still returning DE posts.

    Really strange that it works when you are logged in.

    Thread Starter neueweide

    (@neueweide)

    ok i will try this on a new install and let you know what the result is.

    robert

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘do_shortcode [ajax_load_more] only working with default language in WPML’ is closed to new replies.