Issue in blog posts

I have created a multi-language website …
When i added a post in english it appears in the News page.
When i translate the same post in Arabic, i dont see the post in the Arabic News page (أخبار الواحه)
i tried to create a post in arabic only but i got the same problem.
however, i see my arabic posts in the wedget area under recent posts but not pasted in the page …

URL of the website
https://fahada.sgedu.site/kssp/news

first screen shot is the blog page in english, second is the blog page in arabic

Note: I use WPML plugin

Hi there,

Thanks for writing in! Would you mind providing us with login credentials so we can take a closer look? Please provide following information:

Set it as Secure Note

  • Link to your site
  • WordPress Admin username / password
  • FTP credentials

Thanks!

https://fahada.sgedu.site/kssp

Hi there,

I have checked the Arabic version of the news page and there seems to be a JS error that is causing the posts not to show up on the page. It could be caused conflict with the way we use the Isotope library and one of 3rd party plugins that you may use.

Would you mind testing for plugin conflict? You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

Let us know how it goes!

Dear Brother

I did the same as requested, with no success …

Please advise …

Thanks
Fahad

I also created a new blog page and set it as the blog page from settings>Readings
I did duplicate the page for arabic translation. However, issue still exists with the new blog page …

Hi There,

Please switch your language permalink format to sub-folder format (eg. www.mysite.com/ar/) instead of /?lang=ar format.

Also navigate to WPML > Tranlation Options > Custom posts and translate everything.

Hope it helps,
Cheers!

Could you please elaborate more on how i can do this (the first option). which permalink option from the screen shot attached?

oh i know how to do it …
i changed the permalink under wpml to subdirectory format …
i refresh the page but issue remains …

i do the other option as well and let you know …

thanks
fahad

I did the second request; translating everything under wpml> translation option> custom posts. but still the same issue …

Please advise

thanks
fahad

Hello Fahad,

Thanks for updating in! To resolve this issue, please do the following steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

<?php

// =============================================================================
// VIEWS/GLOBAL/_SCRIPT-ISOTOPE-INDEX.PHP
// -----------------------------------------------------------------------------
// Isotope script call for index output.
// =============================================================================

$is_rtl = is_rtl();

?>

<script>

  jQuery(document).ready(function($) {

    <?php if ( $is_rtl ) : ?>

      $.xIsotope.prototype._positionAbs = function( x, y ) {
        return { right: x, top: y };
      };

    <?php endif; ?>

    var $container = $('#x-iso-container');

    $container.before('<span id="x-isotope-loading"><span>');

    $(window).on('load', function() {
      $container.xIsotope({
        itemSelector   : '.x-iso-container > .hentry',
        resizable      : true,
        filter         : '*',
        <?php if ( $is_rtl ) : ?>
          transformsEnabled : false,
        <?php endif; ?>
        containerStyle : {
          overflow : 'hidden',
          position : 'relative'
        }
      });
      $('#x-isotope-loading').stop(true,true).fadeOut(300);
      $('#x-iso-container > .hentry').each(function(i) {
        $(this).delay(i * 150).animate({'opacity' : 1}, 500);
      });
    });

    $(window).xsmartresize(function() {
      $container.xIsotope({  });
    });

  });

</script>

3] Save the file named as _script-isotope-index.php
4] Upload this file to your server in the child theme’s folder wp-content/themes/x-child/framework/views/global/

Please let us know how it goes.

It works … Thanks for your support …

I have another issue i just discovered when i was testing …

It is in the blog page as well …

When i click on any post under the recent posts widget (say post#1) … it takes me to the post i clicked (as expected) …
however, when i click on another recent post (say post#2), it takes me again to post#1 … every time i click on any post under the recent posts widget, it takes me to post#1

Please advise …
Thanks
fahad …

Hello Fahad,

The recent post widget has an issue with WPML. To resolve it, please check the step by step instructions from the WPML support:

Hope this helps. Kindly let us know.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.