@@ -1,11 +1,11 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Custom template tags for this theme. |
|
| 4 | - * |
|
| 5 | - * Eventually, some of the functionality here could be replaced by core features. |
|
| 6 | - * |
|
| 7 | - * @package Lighthouse |
|
| 8 | - */ |
|
| 3 | + * Custom template tags for this theme. |
|
| 4 | + * |
|
| 5 | + * Eventually, some of the functionality here could be replaced by core features. |
|
| 6 | + * |
|
| 7 | + * @package Lighthouse |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | if ( ! function_exists( 'lighthouse_posted_on' ) ) : |
| 11 | 11 | /** |
@@ -125,16 +125,16 @@ discard block |
||
| 125 | 125 | */ |
| 126 | 126 | //Left menu |
| 127 | 127 | function lighthouse_header_menu_left() { |
| 128 | - if ( has_nav_menu( 'header-menu-left' ) ) { |
|
| 129 | - wp_nav_menu( |
|
| 130 | - array( |
|
| 131 | - 'theme_location' => 'header-menu-left', |
|
| 132 | - 'menu' => '', |
|
| 133 | - 'container' => 'div', |
|
| 134 | - 'container_id' => 'header-menu-left-id', |
|
| 135 | - 'container_class' => 'header-menu-left-cl', |
|
| 136 | - 'menu_id' => 'header-menu-id', |
|
| 137 | - 'menu_class' => 'header-menu-cl', |
|
| 128 | + if ( has_nav_menu( 'header-menu-left' ) ) { |
|
| 129 | + wp_nav_menu( |
|
| 130 | + array( |
|
| 131 | + 'theme_location' => 'header-menu-left', |
|
| 132 | + 'menu' => '', |
|
| 133 | + 'container' => 'div', |
|
| 134 | + 'container_id' => 'header-menu-left-id', |
|
| 135 | + 'container_class' => 'header-menu-left-cl', |
|
| 136 | + 'menu_id' => 'header-menu-id', |
|
| 137 | + 'menu_class' => 'header-menu-cl', |
|
| 138 | 138 | 'echo' => true, |
| 139 | 139 | 'fallback_cb' => '', |
| 140 | 140 | 'before' => '', |
@@ -144,23 +144,23 @@ discard block |
||
| 144 | 144 | 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
| 145 | 145 | 'depth' => 0, |
| 146 | 146 | 'walker' => '' |
| 147 | - ) |
|
| 148 | - ); |
|
| 149 | - } |
|
| 147 | + ) |
|
| 148 | + ); |
|
| 149 | + } |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | //Right menu |
| 153 | 153 | function lighthouse_header_menu_right() { |
| 154 | - if ( has_nav_menu( 'header-menu-right' ) ) { |
|
| 155 | - wp_nav_menu( |
|
| 156 | - array( |
|
| 157 | - 'theme_location' => 'header-menu-right', |
|
| 158 | - 'menu' => '', |
|
| 159 | - 'container' => 'div', |
|
| 160 | - 'container_id' => 'header-menu-right-id', |
|
| 161 | - 'container_class' => 'header-menu-right-cl', |
|
| 162 | - 'menu_id' => 'header-menu-id', |
|
| 163 | - 'menu_class' => 'header-menu-cl', |
|
| 154 | + if ( has_nav_menu( 'header-menu-right' ) ) { |
|
| 155 | + wp_nav_menu( |
|
| 156 | + array( |
|
| 157 | + 'theme_location' => 'header-menu-right', |
|
| 158 | + 'menu' => '', |
|
| 159 | + 'container' => 'div', |
|
| 160 | + 'container_id' => 'header-menu-right-id', |
|
| 161 | + 'container_class' => 'header-menu-right-cl', |
|
| 162 | + 'menu_id' => 'header-menu-id', |
|
| 163 | + 'menu_class' => 'header-menu-cl', |
|
| 164 | 164 | 'echo' => true, |
| 165 | 165 | 'fallback_cb' => '', |
| 166 | 166 | 'before' => '', |
@@ -170,23 +170,23 @@ discard block |
||
| 170 | 170 | 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
| 171 | 171 | 'depth' => 0, |
| 172 | 172 | 'walker' => '' |
| 173 | - ) |
|
| 174 | - ); |
|
| 175 | - } |
|
| 173 | + ) |
|
| 174 | + ); |
|
| 175 | + } |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | //Fotter menu |
| 179 | 179 | function lighthouse_footer_menu() { |
| 180 | - if ( has_nav_menu( 'footer-menu' ) ) { |
|
| 181 | - wp_nav_menu( |
|
| 182 | - array( |
|
| 183 | - 'theme_location' => 'footer-menu', |
|
| 184 | - 'menu' => '', |
|
| 185 | - 'container' => 'div', |
|
| 186 | - 'container_id' => 'footer-menu-id', |
|
| 187 | - 'container_class' => 'footer-menu-cl', |
|
| 188 | - 'menu_id' => 'footer-menu-id', |
|
| 189 | - 'menu_class' => 'footer-menu-cl', |
|
| 180 | + if ( has_nav_menu( 'footer-menu' ) ) { |
|
| 181 | + wp_nav_menu( |
|
| 182 | + array( |
|
| 183 | + 'theme_location' => 'footer-menu', |
|
| 184 | + 'menu' => '', |
|
| 185 | + 'container' => 'div', |
|
| 186 | + 'container_id' => 'footer-menu-id', |
|
| 187 | + 'container_class' => 'footer-menu-cl', |
|
| 188 | + 'menu_id' => 'footer-menu-id', |
|
| 189 | + 'menu_class' => 'footer-menu-cl', |
|
| 190 | 190 | 'echo' => true, |
| 191 | 191 | 'fallback_cb' => '', |
| 192 | 192 | 'before' => '', |
@@ -196,23 +196,23 @@ discard block |
||
| 196 | 196 | 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
| 197 | 197 | 'depth' => 0, |
| 198 | 198 | 'walker' => '' |
| 199 | - ) |
|
| 200 | - ); |
|
| 201 | - } |
|
| 199 | + ) |
|
| 200 | + ); |
|
| 201 | + } |
|
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | //Menu footer-bottom |
| 205 | 205 | function lighthouse_footer_menu_bottom() { |
| 206 | - if ( has_nav_menu( 'footer-menu-bottom' ) ) { |
|
| 207 | - wp_nav_menu( |
|
| 208 | - array( |
|
| 209 | - 'theme_location' => 'footer-menu-bottom', |
|
| 210 | - 'menu' => '', |
|
| 211 | - 'container' => 'div', |
|
| 212 | - 'container_id' => 'footer-menu-bottom-id', |
|
| 213 | - 'container_class' => 'footer-menu-bottom-cl', |
|
| 214 | - 'menu_id' => 'footer-menu-id', |
|
| 215 | - 'menu_class' => 'footer-menu-cl', |
|
| 206 | + if ( has_nav_menu( 'footer-menu-bottom' ) ) { |
|
| 207 | + wp_nav_menu( |
|
| 208 | + array( |
|
| 209 | + 'theme_location' => 'footer-menu-bottom', |
|
| 210 | + 'menu' => '', |
|
| 211 | + 'container' => 'div', |
|
| 212 | + 'container_id' => 'footer-menu-bottom-id', |
|
| 213 | + 'container_class' => 'footer-menu-bottom-cl', |
|
| 214 | + 'menu_id' => 'footer-menu-id', |
|
| 215 | + 'menu_class' => 'footer-menu-cl', |
|
| 216 | 216 | 'echo' => true, |
| 217 | 217 | 'fallback_cb' => '', |
| 218 | 218 | 'before' => '', |
@@ -222,9 +222,9 @@ discard block |
||
| 222 | 222 | 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
| 223 | 223 | 'depth' => 0, |
| 224 | 224 | 'walker' => '' |
| 225 | - ) |
|
| 226 | - ); |
|
| 227 | - } |
|
| 225 | + ) |
|
| 226 | + ); |
|
| 227 | + } |
|
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Template Name: Template with Visual Editor |
|
| 4 | - * |
|
| 5 | - * @package Lighthouse |
|
| 6 | - */ |
|
| 3 | + * Template Name: Template with Visual Editor |
|
| 4 | + * |
|
| 5 | + * @package Lighthouse |
|
| 6 | + */ |
|
| 7 | 7 | get_header(); ?> |
| 8 | 8 | |
| 9 | 9 | <div class="container"> |
@@ -1,11 +1,11 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * The template for displaying all single posts. |
|
| 4 | - * |
|
| 5 | - * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post |
|
| 6 | - * |
|
| 7 | - * @package Lighthouse |
|
| 8 | - */ |
|
| 3 | + * The template for displaying all single posts. |
|
| 4 | + * |
|
| 5 | + * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post |
|
| 6 | + * |
|
| 7 | + * @package Lighthouse |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | get_header(); ?> |
| 11 | 11 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | <?php |
| 56 | 56 | $postslist = get_posts('numberposts=99&order=DESC&orderby=date'); |
| 57 | 57 | foreach ($postslist as $post) : |
| 58 | - setup_postdata($post); |
|
| 58 | + setup_postdata($post); |
|
| 59 | 59 | ?> |
| 60 | 60 | <div class="col-xs-12"> |
| 61 | 61 | <div class="entry"> |
@@ -33,9 +33,9 @@ |
||
| 33 | 33 | while ( have_posts() ) { |
| 34 | 34 | the_post(); |
| 35 | 35 | if ( is_search() ) : |
| 36 | - get_template_part( 'template-parts/content', 'search' ); |
|
| 36 | + get_template_part( 'template-parts/content', 'search' ); |
|
| 37 | 37 | else : |
| 38 | - get_template_part( 'template-parts/content', get_post_format() ); |
|
| 38 | + get_template_part( 'template-parts/content', get_post_format() ); |
|
| 39 | 39 | endif; |
| 40 | 40 | } |
| 41 | 41 | } |
@@ -1,9 +1,9 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Template Name: Blog |
|
| 4 | - * |
|
| 5 | - * @package Lighthouse |
|
| 6 | - */ |
|
| 3 | + * Template Name: Blog |
|
| 4 | + * |
|
| 5 | + * @package Lighthouse |
|
| 6 | + */ |
|
| 7 | 7 | get_header(); ?> |
| 8 | 8 | <div class="title-wrapper"> |
| 9 | 9 | <div class="container blog-wrapper"> |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | <div class="row"> |
| 68 | 68 | <div class="col-xs-12"> |
| 69 | 69 | <?php if (function_exists("pagination")) {
|
| 70 | - pagination($loop->max_num_pages); |
|
| 70 | + pagination($loop->max_num_pages); |
|
| 71 | 71 | } ?> |
| 72 | 72 | </div> |
| 73 | 73 | </div> |
@@ -1,11 +1,11 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Lighthouse functions and definitions. |
|
| 4 | - * |
|
| 5 | - * @link https://developer.wordpress.org/themes/basics/theme-functions/ |
|
| 6 | - * |
|
| 7 | - * @package Lighthouse |
|
| 8 | - */ |
|
| 3 | + * Lighthouse functions and definitions. |
|
| 4 | + * |
|
| 5 | + * @link https://developer.wordpress.org/themes/basics/theme-functions/ |
|
| 6 | + * |
|
| 7 | + * @package Lighthouse |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | if ( ! function_exists( 'lighthouse_setup' ) ) : |
| 11 | 11 | /** |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | * Read More button in excerpt |
| 179 | 179 | */ |
| 180 | 180 | function new_excerpt_more( $more ) { |
| 181 | - return '... <a class="readmore" href="' . get_permalink() . ' ">Read more <i class="fa fa-external-link"></i></a>'; |
|
| 181 | + return '... <a class="readmore" href="' . get_permalink() . ' ">Read more <i class="fa fa-external-link"></i></a>'; |
|
| 182 | 182 | } |
| 183 | 183 | add_filter( 'excerpt_more', 'new_excerpt_more' ); |
| 184 | 184 | |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | echo '</div></div>'; |
| 238 | 238 | |
| 239 | 239 | endwhile; |
| 240 | - wp_reset_postdata(); |
|
| 240 | + wp_reset_postdata(); |
|
| 241 | 241 | endif; |
| 242 | 242 | |
| 243 | 243 | echo '</div></div>'; |
@@ -249,39 +249,39 @@ discard block |
||
| 249 | 249 | // Numbered Pagination |
| 250 | 250 | function pagination($pages = '', $range = 4) |
| 251 | 251 | { |
| 252 | - $showitems = ($range * 2)+1; |
|
| 252 | + $showitems = ($range * 2)+1; |
|
| 253 | 253 | |
| 254 | - global $paged; |
|
| 255 | - if(empty($paged)) $paged = 1; |
|
| 254 | + global $paged; |
|
| 255 | + if(empty($paged)) $paged = 1; |
|
| 256 | 256 | |
| 257 | - if($pages == '') |
|
| 258 | - { |
|
| 259 | - global $wp_query; |
|
| 260 | - $pages = $wp_query->max_num_pages; |
|
| 261 | - if(!$pages) |
|
| 262 | - { |
|
| 263 | - $pages = 1; |
|
| 264 | - } |
|
| 265 | - } |
|
| 257 | + if($pages == '') |
|
| 258 | + { |
|
| 259 | + global $wp_query; |
|
| 260 | + $pages = $wp_query->max_num_pages; |
|
| 261 | + if(!$pages) |
|
| 262 | + { |
|
| 263 | + $pages = 1; |
|
| 264 | + } |
|
| 265 | + } |
|
| 266 | 266 | |
| 267 | - if(1 != $pages) |
|
| 268 | - { |
|
| 269 | - echo "<div class=\"pagination\"><span>Page ".$paged." of ".$pages."</span>"; |
|
| 270 | - if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<a href='".get_pagenum_link(1)."'>« First</a>"; |
|
| 271 | - if($paged > 1 && $showitems < $pages) echo "<a href='".get_pagenum_link($paged - 1)."'>‹ Previous</a>"; |
|
| 267 | + if(1 != $pages) |
|
| 268 | + { |
|
| 269 | + echo "<div class=\"pagination\"><span>Page ".$paged." of ".$pages."</span>"; |
|
| 270 | + if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<a href='".get_pagenum_link(1)."'>« First</a>"; |
|
| 271 | + if($paged > 1 && $showitems < $pages) echo "<a href='".get_pagenum_link($paged - 1)."'>‹ Previous</a>"; |
|
| 272 | 272 | |
| 273 | - for ($i=1; $i <= $pages; $i++) |
|
| 274 | - { |
|
| 275 | - if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems )) |
|
| 276 | - { |
|
| 277 | - echo ($paged == $i)? "<span class=\"current\">".$i."</span>":"<a href='".get_pagenum_link($i)."' class=\"inactive\">".$i."</a>"; |
|
| 278 | - } |
|
| 279 | - } |
|
| 273 | + for ($i=1; $i <= $pages; $i++) |
|
| 274 | + { |
|
| 275 | + if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems )) |
|
| 276 | + { |
|
| 277 | + echo ($paged == $i)? "<span class=\"current\">".$i."</span>":"<a href='".get_pagenum_link($i)."' class=\"inactive\">".$i."</a>"; |
|
| 278 | + } |
|
| 279 | + } |
|
| 280 | 280 | |
| 281 | - if ($paged < $pages && $showitems < $pages) echo "<a href=\"".get_pagenum_link($paged + 1)."\">Next ›</a>"; |
|
| 282 | - if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($pages)."'>Last »</a>"; |
|
| 283 | - echo "</div>\n"; |
|
| 284 | - } |
|
| 281 | + if ($paged < $pages && $showitems < $pages) echo "<a href=\"".get_pagenum_link($paged + 1)."\">Next ›</a>"; |
|
| 282 | + if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($pages)."'>Last »</a>"; |
|
| 283 | + echo "</div>\n"; |
|
| 284 | + } |
|
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | /** |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * The template for displaying the footer. |
|
| 4 | - * |
|
| 5 | - * Contains the closing of the #content div and all content after. |
|
| 6 | - * |
|
| 7 | - * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials |
|
| 8 | - * |
|
| 9 | - * @package Lighthouse |
|
| 10 | - */ |
|
| 3 | + * The template for displaying the footer. |
|
| 4 | + * |
|
| 5 | + * Contains the closing of the #content div and all content after. |
|
| 6 | + * |
|
| 7 | + * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials |
|
| 8 | + * |
|
| 9 | + * @package Lighthouse |
|
| 10 | + */ |
|
| 11 | 11 | |
| 12 | 12 | ?> |
| 13 | 13 | |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Template part for displaying page content in page.php. |
|
| 4 | - * |
|
| 5 | - * @link https://codex.wordpress.org/Template_Hierarchy |
|
| 6 | - * |
|
| 7 | - * @package Lighthouse |
|
| 8 | - */ |
|
| 3 | + * Template part for displaying page content in page.php. |
|
| 4 | + * |
|
| 5 | + * @link https://codex.wordpress.org/Template_Hierarchy |
|
| 6 | + * |
|
| 7 | + * @package Lighthouse |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | ?> |
| 11 | 11 | |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * The template for displaying 404 pages (not found). |
|
| 4 | - * |
|
| 5 | - * @link https://codex.wordpress.org/Creating_an_Error_404_Page |
|
| 6 | - * |
|
| 7 | - * @package Lighthouse |
|
| 8 | - */ |
|
| 3 | + * The template for displaying 404 pages (not found). |
|
| 4 | + * |
|
| 5 | + * @link https://codex.wordpress.org/Creating_an_Error_404_Page |
|
| 6 | + * |
|
| 7 | + * @package Lighthouse |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | get_header(); ?> |
| 11 | 11 | |