Not sure I entirely understand what you need – but try changing the else statement to this:
else {
$service_class = "tg-one-third tg-item-" . $j;
}
It should add another class to each, i.e. ‘tg-item-1’, ‘tg-item-2’, etc. – allowing you to target those specific divs
Related Posts:
- How to get the registered sidebar’s name by its id?
- List authors with posts in a category
- Widgets not showing in my custom theme
- Widgets not showing on custom theme
- Show different website layout if no sidebar added
- How do you create a custom category widget that you can style?
- How to use wp_get_attachment_image or wp_get_attachment_image_src instead of $instance[‘single_feature_image_uri’]
- WordPress Themes and PHP unit
- Need help setting default setting value for radio button in theme customizer
- Remove Customize Background and Header from Appearance admin menu without CSS or JS
- Dynamically change feature image in customiser
- Design view breaking on Pages
- Adjust the results quantity for Search Results page pagination
- display most popular tags in two columns
- How can I loop into two different DIVS without repeating the DIVs
- WordPress loop specific thumbnail size
- Is it possible to use the featured image of a page as a css background without inlining?
- How do I translate this string – PHP syntax question
- Site Health : An active PHP session was detected
- Why WordPress architecture is not pure object oriented and it don’t use MVC pattern? [closed]
- How to display recent posts on home page with custom HTML
- Add before_content and after_content to register_sidebar
- using add_action for a header hook that has an additional parameter
- How to show a dynamic_sidebar if main content content’s height is > a set amount?
- write custom woocommerce templates and forms
- Using a `Template Parts` folder instead of an `Includes` folder in a Custom WordPress Theme
- Set the checkbox as checked by default at options page
- How do I add custom bulk actions to multiple custom post types?
- populate form fields in a loop with ajax
- Error in custom php function doesn’t exist
- Recent Posts Not Showing Only On A Specific Category Page [closed]
- Why my image upload button is not working in wordpress widget area?
- Is there a way to conditionally check whether a WordPress post title is empty?
- How to remove woocommerce_breadcrumb() from do_action( ‘woocommerce_before_main_content’ ); [closed]
- Use WordPress function in php file
- How to determine if the sidebar is empty? Or not active?
- Is it bad to add html to a widget by closing and reopening the php tags?
- Widget back end radio button issue
- WordPress Customizer Default Image
- Theme’s Options Page included with require_once *.php in functions.php not visible anymore
- How to show an entire post content and not also the excerpt?
- Why in my theme I can’t see all the statics content under the posts?
- Why is an array created in a function hooked to customize register populated when customizer is loaded but not when the front-end is loaded?
- How to add the sidebar to all the pages except the home page? [closed]
- Header not properly displaying on archive.php
- Double Curly Brackets in Php
- Correctly Using checked function of WordPress
- Removing “Powered by” footer using child theme PHP [closed]
- Unable to access WordPress functions from functions.php
- display specific widget to a page
- Removed jQuery script from header.php , any problems?
- Dynamically display font icons in widget
- Correct code to use php in text widget
- pass html code to worpdress
- Commas in Tag Cloud
- Trying to change featured image from 180×180 to full width on home page
- Remove the Tag from wp_nav_menu
- security concerns if using html data-* attribute for l10n?
- WordPress 6.0 class-wp-widget.php fatal errors in PHP 8.1.6
- Need help for some PHP code
- How do you get the current post taxonomy so I can get the current post taxonomy? into a variable to THEN loop through all post with that taxonomy.,
- How to change basename url for wp-admin?
- how to replace h1 entry title with h2 in category pages only
- url not using query string no longer working
- Not able to remove caption shortcode from the content
- Loading Widgets Via Child Theme
- Weird fonts showing which are coming from database
- Problem with displaying CSS Stylesheets – Am I adding them correctly in my wordpress child theme?
- require get_template_directory() . ‘path/to-my/file.php’ BREAKS customize > themes functionality
- Inserting a class on before_widget if checkbox is checked
- Current WordPress Page Title as Search Parameter into A Tag
- How to have different headers.php files based on the display page
- Display post date also if the date it’s the same for each post
- Submit remote form to wordpress REST API and save data to custom post type
- dashboard widget form not submit mails
- Add a custom link to each image in WordPress gallery
- register dependency css and js inside a plugin class
- Proper use of Output Buffer for a whole php clas
- Collapsible menu on post sidebar only expands and does not collapse
- How to make a “page-option” in WordPress
- missing admin bar and widget in a template
- CSS loading as empty file in Custom Theme
- My own theme’s custom widget areas are not working
- How to get php file based on URL in WordPress
- How can I customize a WordPress theme before it’s downloaded?
- I want different post-thumbnail size depending on media size
- Beyond widget side menu editing, with the php page, custom template
- widget: input the px value from user and use it as inline style in widget function
- Trying send mail from Theme page
- WordPress – registering sidebar and adding a button directly after .textwidget
- How to change links in the 3 main categories, on widget category, to a javascript function call
- WordPress causing all code to be displayed on line 1. Receiving multiple errors after cleaning cookies and cache
- Adding code to the function file
- Shortcode working in page.php but not in category.php in wordpress
- Adding a Sub Menu Options Page WP Backend Menu. Whats wrong with my code?
- WP Debug enabled Undefined index error in a widget
- How can a ‘scripts’ directory be hooked into wp_head();?
- WP and Laravel integration (Updated) [closed]
- PHP warning: Undefined array key 2 in feed.php
- How to edit a widget code?