Osclass Support Forums

Osclass plugin support => Blog and News Plugin => Topic started by: Locan on June 21, 2018, 12:59:30 PM

Title: custom style in home Page or categories page to make Header style
Post by: Locan on June 21, 2018, 12:59:30 PM
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>';
        }
      
?>
Title: Re: custom style in home Page or categories page to make Header style
Post by: MB Themes on June 21, 2018, 01:14:59 PM
@dom
Use nth-child property of css instead.
Title: Re: custom style in home Page or categories page to make Header style
Post by: MB Themes 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, ...
Title: Re: custom style in home Page or categories page to make Header style
Post by: Locan on June 21, 2018, 01:34:10 PM
thank dear i will test it