$curUrl = get_page_link(); $isBusiness = strpos($curUrl, "business-insurance"); $isAuto = strpos($curUrl, "auto-insurance"); $isHomeowners = strpos($curUrl, "homeowners-insurance"); if ($isBusiness !== false) { $titleClass = "businesstitle"; $className = "businesspage"; $sidebarName = "business_sidebar.php"; $linkSrc = $linkSrc . "/business-insurance/articles/"; $cat_ID = getBusiArticles(); } elseif ($isAuto !== false) { $titleClass = "autotitle"; $className = "autopage"; $sidebarName = "auto_sidebar.php"; $linkSrc = $linkSrc . "/auto-insurance/articles/"; $cat_ID = getAutoArticles(); } elseif ($isHomeowners !== false) { $titleClass = "homeownerstitle"; $className = "homeownerspage"; $sidebarName = "homeowners_sidebar.php"; $linkSrc = $linkSrc . "/homeowners-insurance/articles/"; $cat_ID = getHomeArticles(); } ?> <div class="<?php echo $className; ?> " id="subimagearea"> <div id="subcontent"> <div id="breadcrumbs"></div>
<div class="rspace"></div> <p>Protect your home and its contents with the right Homeowners Insurance solution:</p> <ul> <li> <a href="/homeowners-insurance/solutions/homeowners-insurance">Homeowners</a></li> <li> <a href="/homeowners-insurance/solutions/renters-insurance">Renters</a></li> <li> <a href="/homeowners-insurance/solutions/condo-insurance">Condo</a></li> <li> <a href="/homeowners-insurance/solutions/mobile-home-insurance">Mobile Home </a></li> </ul> <p class="blue viewall"><a href="/homeowners-insurance/solutions/">View All</a> ></p> </div> <div style="clear:left;"></div> <div class="knowledge"> <h2>Knowledge Center</h2> <?php $catIDArr = array(getBusiArticles(), getAutoArticles(), getHomeArticles()); $articlesNum = 0; $posts = get_posts("category=" . implode(',', $catIDArr) . "&numberposts=20"); if ($posts) { ?> <ul> <?php foreach ($posts as $post) { setup_postdata($post); if ($articlesNum > 5) { break; } $articlesNum += 1; ?> <li> <a href="<?php
/** * The template for displaying content in the articles or news post template * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ $category = get_the_category(); $cat_id = $category[0]->cat_ID; $linkSrc = esc_url(get_home_url()); if ($cat_id == getBusiArticles()) { $titleClass = "businesstitle"; $linkName = "Business Insurance Articles"; $linkSrc = $linkSrc . "/business-insurance/articles/"; } elseif ($cat_id == getAutoArticles()) { $titleClass = "autotitle"; $linkName = "Auto Insurance Articles"; $linkSrc = $linkSrc . "/auto-insurance/articles/"; } elseif ($cat_id == getHomeArticles()) { $titleClass = "homeownerstitle"; $linkName = "Homeowners Insurance Articles"; $linkSrc = $linkSrc . "/homeowners-insurance/articles/"; } elseif ($cat_id == getNews()) { $titleClass = "generictitle"; $linkName = "News"; $linkSrc = $linkSrc . "/about/news/"; } ?> <h1 class="<?php