تخطي الملاحة

Waiting for author

Reported for: إضافة WPML Multilingual CMS 4.5.14

Topic Tags: Compatibility

Overview of the issue

When using WPML Sticky Links with Divi theme builder, internal links aren’t converted automatically. Instead, you will see links in a www.domain.com/?page_id=your-id format.

Workaround

Be sure to make a full backup of you site before proceeding.

  1. Open the …/wp-content/themes/Divi/includes/builder/core.php file.
  2. Add the following snippet after line 36:
    // WPML Workaround for Sticky links
    if ( class_exists('WPML_Sticky_Links') ) {
    	$sticky_links = new WPML_Sticky_Links();    
    	add_filter( 'et_builder_render_layout', [ $sticky_links, 'show_permalinks' ] );	
    }
    

6 ردود إلى “Divi - Sticky links aren't converted to permalinks when used in Divi theme builder”

      • Hi Andrés
        Thank you for your reply.

        I do have a child theme, and it is my understanding that I can add modifications to the original files just by creating a file with the same name and path. However, how would I make sure that the modification (in this case the above snippet) is added in the right place (line 36)? If I copy the whole content of the core.php file, I imagine it could create problems if the original core.php file is changed in a future update?

        • Hello Alan,
          Yes, that’s one of the risks of modifying files through a child theme. If you think is safer, you can modify the original file and monitor if it changes in the next update.
          I also recommend you to contact Divi theme for this purpose. This will increase the priority of this issue and they may guide you better about how to add this modification.
          Regards

  1. Hi Andrés, thanks again for your reply.
    I have now inserted the snippet in the original core.php file and will keep an eye on future Divi updates.
    However, it doesn’t seem to have the effect I was hoping for.
    What happened is, I installed WPML and Sticky Links, but noticed that some links were changed from …/directory/page to something like …/?p=53325 without apparent cause. So I deactivated Sticky Links in the hope to see those links convert back. That didn’t happen, so I activated the plugin again and inserted the snipped above, but still those links are in the …/?p=53325 format.
    Maybe you have any suggestion?

    • If you are seeing that effect on the backend, that’s expected when you are using WPML Sticky Links.
      However, if you are experiencing a different situation, I suggest you to open a chat in our support, in that way one of our specialists can investigate your case.
      Regards

ترك رد

يُرجى البقاء في الموضوع والتزام الاحترام للآخرين. إذا كنت بحاجة إلى مساعدة بشأن المشكلات التي لا تتعلق بهذا المنشور، فاستخدم منتدى الدعم لبدء محادثة أو إرسال تذكرة.

يمكنك استخدام هذه العلامات:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>