<h3 class="mtop40">We're here to help. <span>1.800.759.2248</span></h3> <?php } else { ?> <h3>We're here to help. <span>1.800.759.2248</span></h3> <?php } ?> </div> <nav id="main-nav"> <?php // Load the appropriate "Mega Menu" for each of the three main States and the FAQs if (is_singular('faq')) { // Check posts2posts to see if this post is connected $p2p_florida = p2p_type('state_to_faq')->get_p2p_id($post->ID, incnow_get_state('FL')); $p2p_nevada = p2p_type('state_to_faq')->get_p2p_id($post->ID, incnow_get_state('NV')); // Florida if ($p2p_florida) { //get_template_part( 'partials/menu-header', 'florida' ); wp_nav_menu(array('container' => 'false', 'menu' => 'header-main-florida')); // Nevada } elseif ($p2p_nevada) { //get_template_part( 'partials/menu-header', 'florida' ); wp_nav_menu(array('container' => 'false', 'menu' => 'header-main-nevada')); // Delaware / Catchall } else { wp_nav_menu(array('container' => 'false', 'menu' => 'header-main-delaware')); } } else { if (is_page('states')) { // if it's our new states page we don't want the extra navigation
*/ $active_state = get_query_var('state_name'); $connected_faqs = new WP_Query(array('post_type' => 'faq', 'posts_per_page' => -1, 'connected_type' => 'state_to_faq', 'connected_items' => 'any', 'suppress_filters' => false, 'connected_direction' => 'from', 'nopaging' => true)); $connected_ids = array(); while ($connected_faqs->have_posts()) { $connected_faqs->the_post(); $connected_ids[] = get_the_ID(); } wp_reset_postdata(); if ($active_state == 'Nevada' or $active_state == 'Florida') { // Set the appropriate State ID based on the active State if ($active_state == 'Florida') { $state_id = incnow_get_state('FL'); } else { if ($active_state = 'Nevada') { $state_id = incnow_get_state('NV'); } } $faqs = new WP_Query(array('post_type' => 'faq', 'posts_per_page' => 999, 'connected_type' => 'state_to_faq', 'connected_items' => $state_id, 'paged' => get_query_var('paged'))); } else { $faqs = new WP_Query(array('post_type' => 'faq', 'posts_per_page' => 999, 'post_status' => 'publish', 'paged' => get_query_var('paged'), 'post__not_in' => $connected_ids)); } get_header(); ?> <div id="main-content"> <div class="row"> <div class="nine columns"> <section id="content" class="faq"> <?php while ($faqs->have_posts()) {
<?php // Here's some data we need $state_name = get_the_title(incnow_get_state_id()); $delaware_id = incnow_get_state('DE'); ?> <!-- Popup Window --> <div id="popup-compare-states" class="popup compare-chart mfp-hide"> <!--<header> <span class="title"><?php echo $state_name; ?> vs. Delaware LLC's: Which State Is Better?</span> <p class="closeBtn">Close</p> </header> --> <table> <thead> <tr> <th colspan="11" class="theader"> <span class="title"><?php echo $state_name; ?> vs. Delaware LLC's: Which State Is Better?</span> <p class="closeBtn">Close</p> </th> </tr> <tr> <th class="state">States</th> <th class="filing-fee">LLC Filing Fee</th>
<?php /** * The sidebar throughout the site */ $is_florida = incnow_is_state('FL'); $is_nevada = incnow_is_state('NV'); if ($is_nevada || $is_florida) { if ($is_nevada) { $state_id = incnow_get_state('NV'); } if ($is_florida) { $state_id = incnow_get_state('FL'); } $state = get_post_ancestors($post); $state_name = get_the_title($state_id); $faqs = new WP_Query(array('post_type' => 'faq', 'posts_per_page' => -1, 'connected_type' => 'state_to_faq', 'connected_items' => $state_id)); $more_url = add_query_arg('state_name', $state_name, site_url('/faqs/')); } else { // Delaware needs all posts without a connection $connected_faqs = new WP_Query(array('post_type' => 'faq', 'posts_per_page' => -1, 'connected_type' => 'state_to_faq', 'connected_items' => 'any', 'suppress_filters' => false, 'connected_direction' => 'from', 'nopaging' => true)); $connected_ids = array(); while ($connected_faqs->have_posts()) { $connected_faqs->the_post(); $connected_ids[] = get_the_ID(); } wp_reset_postdata(); $faqs = new WP_Query(array('post_type' => 'faq', 'posts_per_page' => 10, 'post__not_in' => $connected_ids)); $more_url = '/faqs/'; } ?>