1. PROMO Upgrade to Pro Membership @ $99 / Lifetime & access all our 16+ premium Divi extensions: Divi Block, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
HOT Divi.Help Pro One-Page Layouts - Beautifully crafted Divi layouts for you to kick start Divi sites.
View All Pro One-Page Layouts
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color.
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Gallery Module change Text of mfp-counter

Discussion in 'Free Divi Community Forum' started by Sebas-divi, Jul 8, 2024.

  1. Sebas-divi

    Sebas-divi New Member

    Hi,
    I want to change the "mfp-counter" text of Divi.
    If you click on a picture of a gallery module element the counter appears on the downside of the picture.
    For example "1 of 5", "2 of 5",...
    I have a german site and want to exchange the "of".
    I tried to change it via wpml, but can not find the string. Is there a method how to change it without additional code?
     
    1. PRO MEMBER PERKS Beautifully crafted custom colored 'Industrial' Divi layout for all Pro members:View Demo
  2. Divi Booster

    Divi Booster Divi Expert

    Hey Sebas-divi,

    There isn't a setting in Divi to change it and I don't think it's possible to translate it through the likes of WPML as the text image counter text is set by the lightbox library which isn't WordPress-specific and so doesn't use WordPress's string translation functions..

    This post gives two ways to do it - either using my Divi Gallery Booster plugin, or some jQuery code:

    https://divibooster.com/change-the-divi-gallery-module-image-count-separator/

    Hope it helps!
     
  3. Sebas-divi

    Sebas-divi New Member

    Thank you for replying.
    I don't use Divi Gallery Booster. There must be a solution without buying additional plugins I don't need.
     
    1. PRO MEMBER PERKS Divi Mini Cart Pro Plugin - Instantly add 3 different types of mini cart to your Divi site:Learn More
  4. Divi Booster

    Divi Booster Divi Expert

    Yes, check the second part of that post under the "Change the Gallery Module Image Counter Separator using jQuery" heading. It explains how to do it with some code (but not much). I don't think you'll find an easier option that that for the reasons I mentioned before.
     
  5. Sebas-divi

    Sebas-divi New Member

    Okey, I understand. Problem is, that the code is not showing up correctly. I just can see the following snippet instead of the code:
    [et_pb_dmb_code_snippet code="PHNjcmlwdD4KalF1ZXJ5KGRvY3VtZW50KS5yZWFkeShmdW5jdGlvbigkKSB7CiAgICBzZXRUaW1lb3V0KAogICAgICAgIGZ1bmN0aW9uKCkgewogICAgICAgICAgICAkKCcuZXRfcGJfZ2FsbGVyeV9pdGVtcycpLmRhdGEoJ21hZ25pZmljUG9wdXAnKS5nYWxsZXJ5LnRDb3VudGVyID0gJyVjdXJyJSAvICV0b3RhbCUnOwogICAgICAgIH0sCiAgICAgICAgMAogICAgKTsKfSk7Cjwvc2NyaXB0Pg==" copy_button="on" _builder_version="4.26.0" _module_preset="default" global_colors_info="{}"][/et_pb_dmb_code_snippet]
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade rolling text design for your Divi site without using any plugins:View Demo
  6. Divi Booster

    Divi Booster Divi Expert

    Ah, sorry about that and thanks for letting me know. I've been setting up a performance plugin and it looks like I didn't have it configured quite right. The post should be working now, but just in case, here is the code:

    Code:
    Log In or Sign Up to view this code.
    I've updated it from what's in the post to set the counter format to "1 von N", so hopefully (if I've got the translation correct) you can use it without modification.