Title: Loop grid
Last modified: March 14, 2024

---

# Loop grid

 *  [jetkey](https://wordpress.org/support/users/jetkey/)
 * (@jetkey)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/loop-grid-2/)
 * Is it possible to change the appearance for individual items in Loop Grid? For
   example, the background of the first item will have a white background, the next
   item a blue background and the third item a white background again. Alternate
   like this.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Floop-grid-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Milos](https://wordpress.org/support/users/miloss84/)
 * (@miloss84)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/loop-grid-2/#post-17500430)
 * Hi there,
 * To address your query, I recommend utilizing the Advanced Custom Fields (ACF)
   third-party plugin to achieve the desired customization for your posts or products
   in the loop grid item template. By incorporating custom fields such as “background-
   color” for each post or product, you can establish unique attributes tailored
   to your specific needs.
 * Here’s a step-by-step guide to implementing this solution:
    1. **Install and Activate ACF Plugin:** Begin by installing the ACF plugin on your
       WordPress website if you haven’t already done so. You can find the plugin in
       the WordPress Plugin Directory.
    2. **Configure Custom Fields:** Once the ACF plugin is activated, navigate to the
       ACF settings within your WordPress dashboard. Create a new custom field group
       for your posts or products, and include a custom field named “color” where you
       can define the desired color for each item.
    3. **Assign Colors:** With the custom field group set up, you can now assign colors
       to individual posts or products by editing each item and entering the respective
       color value in the designated field.
    4. **Dynamic Background Color:** To dynamically add the background color to your
       loop grid template container, you’ll need to modify your theme’s template files.
       Utilize PHP to retrieve the color value from the custom field associated with
       each post or product, and apply it as the background color for the corresponding
       grid container.
 * For visual reference, you can view a screenshot illustrating this process here:
   [Screenshot](https://prnt.sc/W2Yh7QBoNyU9).
 * Should you require further assistance or encounter any challenges during the 
   implementation process, please feel free to reach out. Our team is here to support
   you every step of the way.
 * Best regards,
 *  [jrobie23](https://wordpress.org/support/users/jrobie23/)
 * (@jrobie23)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/loop-grid-2/#post-17555581)
 * You could do this with some simple css that would target every “even” or “odd”
   item and then apply the background color. If you share your grid page, I can 
   send over some css you could try.
 * It would be something like this:
 *     ```wp-block-code
       div.grid-item:nth-child(even) {
            background: #CCC
        }
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Loop grid’ is closed to new replies.

 * ![](https://ps.w.org/elementor/assets/icon-256x256.gif?rev=3444228)
 * [Elementor Website Builder - more than just a page builder](https://wordpress.org/plugins/elementor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/elementor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/elementor/)
 * [Active Topics](https://wordpress.org/support/plugin/elementor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/elementor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/elementor/reviews/)

## Tags

 * [loop](https://wordpress.org/support/topic-tag/loop/)

 * 2 replies
 * 3 participants
 * Last reply from: [jrobie23](https://wordpress.org/support/users/jrobie23/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/loop-grid-2/#post-17555581)
 * Status: not resolved