wiki/knowledge/wordpress/didion-divi-slider-custom-code.md · 747 words · 2026-04-05

Divi Custom Slider Implementation — Didion Milling

Overview

Didion Milling's Culinary Collection and Masa/Arepa pages use a custom-coded scrolling slider that lives outside the Divi page builder. Because Divi does not natively support this slider type, all edits — including adding, removing, or renaming slide items — require direct code changes in functions.php. This is a recurring source of confusion for non-developer editors and should be treated as a known constraint on the site.

See also: [1] | [2]


Key Constraint

Divi cannot manage this slider through its visual builder or page editor. The slider is injected via custom PHP/JavaScript code in the theme's functions.php. Any attempt to edit it through the Divi front-end or back-end builder will not surface the slider controls — the element appears only as a generic "slider" placeholder.

This limitation was confirmed during a December 2025 working session with developer Ishaque Mahmud, who built and maintains the slider code.


Where the Code Lives

Location Path
Theme file Appearance → Theme File Editor → functions.php
Slider type Slick Slider (custom implementation)
Pages affected Culinary Collection, Masa/Arepa

The slider code for each page is a discrete block within functions.php. Each slide item is represented by a code snippet containing an image URL and label text.


How to Edit the Slider

Remove a slide item

  1. Open Appearance → Theme File Editor → functions.php
  2. Locate the slider block for the target page (labeled in comments)
  3. Find the code block corresponding to the item to remove (e.g., "Nachos")
  4. Delete that block entirely
  5. Save the file

Add a slide item

  1. Upload the new image via Media → Add New and copy its URL
  2. Open functions.php and locate the relevant slider block
  3. Copy an existing slide item's code block
  4. Paste it below the last item in the block
  5. Replace the image URL and label text
  6. Save the file

Edit label text (e.g., pluralization)

Tip: Before editing, copy the image URL from the Media Library in a separate tab. You cannot browse media from within the file editor.


Known Issues & Resolutions

Duplicate Slider (December 2025)

Problem: The Culinary Collection page displayed the slider twice — the slider block was being rendered by two different template contexts simultaneously.

Resolution: Ishaque applied a CSS hide rule targeting the duplicate slider's class to suppress the second instance. A follow-up code fix was planned to prevent recurrence without relying on CSS suppression.

Lesson learned: When a page is duplicated in WordPress (e.g., to create a variant), the custom slider injection in functions.php may fire for both the original and the duplicate if page conditions are not tightly scoped.

Corn Masa Flour Page (Redundant Duplicate)

The page /corn-masa-flour/ was identified as an early duplicate of what became the Culinary Collection page. It was confirmed unused and scheduled for disabling (not deletion, to avoid breaking any undetected links).

Action taken: Disable the Corn Masa Flour page in WordPress (set to Draft or Private).


Design Constraints for Future Work

Because the slider is custom-coded rather than plugin-driven:

When planning future Didion website work, avoid proposing slider-based designs unless the team is prepared to manage them through code. Static Divi sections or a supported slider plugin would reduce ongoing maintenance burden.


Action Items (from December 2025 session)

Owner Task Status
Ishaque Record a short walkthrough video of the functions.php slider editing process Committed
Ishaque Disable the Corn Masa Flour page Committed
Ishaque Write code fix to prevent duplicate slider rendering in the future Committed
Melissa Share Fathom recording link with Diana for reference Done (in-call)

Sources

  1. Index
  2. 2025 12 04 Didion Marketing Call
  3. Gravity Forms Paypal Conditional Logic