*

Locan

  • ***
  • 166 posts
i wait MB theme update this plugin so long, now i buy plugin and i want to add new 3 class in div for make Header f home page or categories and search page, let's say
- now blog already have <div class="blg-row blg-first"> class for latest article and i want to add

- class="blg-row blg-Second"
-class="blg-row blg-third"
- class="blg-row blg-four"

how to add 3 style to <div class="blg-row blg">

Code: [Select]
<?php 
        
if(count($blogs) > 0) {
          
$i 1;

          foreach(
$blogs as $blog) {
            
$limit = ($i == 210 140);
            
$class = ($i == 'blg-first' '');

            
blg_article($blog$class$limit);

            
$i++;
          }
        } else { 
          echo 
'<div class="blg-row blg-empty blg-empty-latest">' __('There are no articles yet''blog') . '</div>';
        }
      
?>

*

MB Themes

Re: custom style in home Page or categories page to make Header style
« Reply #1 on: June 21, 2018, 01:14:59 PM »
@dom
Use nth-child property of css instead.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Marked as best answer by dom reysor on June 21, 2018, 01:35:45 PM
*

MB Themes

Re: custom style in home Page or categories page to make Header style
« Reply #2 on: June 21, 2018, 01:15:57 PM »
You could also update line:
            $class = ($i == 1 ? 'blg-first' : '');

to
            $class = 'blg-i' . $i;

to get blg-i1, blg-i2, ...
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Locan

  • ***
  • 166 posts
Re: custom style in home Page or categories page to make Header style
« Reply #3 on: June 21, 2018, 01:34:10 PM »
thank dear i will test it