ナビゲーションをスキップする

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”

  1. Will this workaround stick (no pun intended) after a Divi update?
    Or how would one implement this in a Divi child theme?

      • 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

  2. 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>