Replace permalink url fetches from name-based to ID-based
authorLaury GvR <laury@gaslightmedia.com>
Fri, 29 Jan 2016 19:15:37 +0000 (14:15 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Fri, 29 Jan 2016 19:15:37 +0000 (14:15 -0500)
front-page.php
parts/sidebar.php
single.php

index 4f47c03..7307895 100644 (file)
             <div id="video" class="small-12 columns">
                 <div class="row">
                     <div class="video-img small-12 medium-3 large-3 columns">
-                        <a href="<?php echo esc_url( get_permalink( get_page_by_title( 'Videos' ) ) ); ?>"></a>
+                        <a href="<?php echo esc_url(get_permalink(142)); ?>"></a>
                     </div>
                     <div class="video-text small-8 small-centered small-text-center large-text-left large-9 columns">
-                        <a href="<?php echo esc_url( get_permalink( get_page_by_title( 'Videos' ) ) ); ?>"><h2>Emmet County Videos</h2></a>
-                        <a href="<?php echo esc_url( get_permalink( get_page_by_title( 'Videos' ) ) ); ?>">Emmet County the one of a kind place it is to work, live and play!</a>
+                        <a href="<?php echo esc_url(get_permalink(142)); ?>"><h2>Emmet County Videos</h2></a>
+                        <a href="<?php echo esc_url(get_permalink(142)); ?>">Emmet County the one of a kind place it is to work, live and play!</a>
                     </div>
                 </div>
             </div>
index b6f7d5e..57ab73e 100644 (file)
@@ -1,6 +1,6 @@
 <div class="small-12 left events_mini columns">
     <?php echo do_shortcode('[ai1ec view="agenda" cat_name="Holidays" events_limit="3"]'); ?>
-    <a class="small-centered columns" id="calendar_link" href="<?php echo esc_url( get_permalink( get_page_by_title( 'Event Calendar' ) ) ); ?>"><span style="white-space: nowrap;">View All County</span> <span style="white-space: nowrap;">Meetings &amp; Events</span></a>
+    <a class="small-centered columns" id="calendar_link" href="<?php echo esc_url(get_permalink(27)); ?>"><span style="white-space: nowrap;">View All County</span> <span style="white-space: nowrap;">Meetings &amp; Events</span></a>
     <div class="row collapse text-left">
         <h3>Online Services</h3>
         <a href="#">Government at your service</a>
@@ -34,7 +34,7 @@
             </li>
             <li class="front-sidebar-featured-item">
                 <div>
-                <a target="_blank" href="<?php echo esc_url( get_permalink( get_page_by_title( 'Clerk' ) ) ); ?>">
+                <a target="_blank" href="<?php echo esc_url(get_permalink(285)); ?>">
                     <img src="<?php echo get_template_directory_uri(); ?>/assets/featured-court.jpg">
                     <span class="front-sidebar-featured-title">Vital Records</span>
                     <span class="front-sidebar-featured-text">Search birth, death & marriage records.</span>
@@ -44,7 +44,7 @@
             </li>
             <li class="front-sidebar-featured-item imagine-cover">
                 <div>
-                <a target="_blank" href="<?php echo esc_url( get_permalink( get_page_by_title( 'Imagine Magazine' ) ) ); ?>">
+                <a target="_blank" href="<?php echo esc_url(get_permalink(10625)); ?>">
                     <img src="<?php echo get_template_directory_uri(); ?>/assets/imagine-cover.jpg">
                     <span class="front-sidebar-featured-title">Request Imagine!</span>
                     <span class="front-sidebar-featured-text">One to three-year licenses.</span>
index 7974e4b..ed23e2b 100644 (file)
@@ -69,8 +69,7 @@
                 </div><!-- /#post-404 -->
                 <?php endif;?>
             </div>
-            <?php if (get_post_type( $post ) == "ai1ec_event") {
-            } else { ?>
+            <?php if (get_post_type( $post ) != "ai1ec_event") { ?>
             <div id="blog-side-info-wrapper" class="small-11 small-only-text-center medium-3 columns">
                 <div id="blog-side-info">
                     <form id="searchform" action="<?php bloginfo('url'); ?>" method="get">