Support » Plugin: WP Parallax Content Slider » use different background color to each slide !!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Solved!!!

    in get_article_slide function we can check the article title and assign doubled class

    function get_article_slide($title, $excerpt, $link_article, $url_image, $title_length, $alt_image = 'Alternative text')
    		// Parameters
    		if (strlen($title) > $title_length) $title = substr($title, 0, $title_length)."...";
                    /**** Here is some php codes to make the slider colorful like lezard :) ****/
    		$da_Doubledclass=""; //The Magic variable
    		if(strcmp($title, "title number 1")==0){$da_Doubledclass="color1";}
    		else if(strcmp($title, "title number 2")==0){$da_Doubledclass="color2";}
    		else if(strcmp($title, "title number 3")==0){$da_Doubledclass="color3";}
    		else if(strcmp($title, "title number 4")==0){$da_Doubledclass="color4";}
    		else if(strcmp($title, "title number 5")==0){$da_Doubledclass="color5";}
                     /**** End lezard ****/
    		// Slide output
    		$outputSlide  = "<div class='da-slide $da_Doubledclass'>"."\n";
    		$outputSlide .= "<h2>".$title."</h2>"."\n";
    		$outputSlide .= "<p>".$excerpt."</p>"."\n";
    		$outputSlide .= "<a href='".$link_article."'>Read more</a>"."\n";
    		$outputSlide .= "<div class='da-img'><img src='".$url_image."' alt='".$alt_image."' /></div>"."\n";
    		$outputSlide .= "</div>"."\n";
    		return $outputSlide;

    title number 1 & 2 & 3 …etc
    is example you must check by your articles titles

    with css now we can styling the classes


    if effects get hidden make sure that z-index of h2 & p & da-img is higher than all..

    Thank you,
    Mohamed Nasser

    Plugin Author wp-maverick


    Fell free to share with us your website url to see the result 😉

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘use different background color to each slide !!’ is closed to new replies.