This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Get the ID of a given category | |
$category_id = get_cat_ID( 'Category Name' ); | |
// Get the URL of this category | |
$category_link = get_category_link( $category_id ); | |
?> | |
<!-- Print a link to this category --> | |
<a href="<?php echo esc_url( $category_link ); ?>" title="Category Name">Category Name</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
custom-search-form.php | |
============================================ | |
<div class="content-search"> | |
<form role="search" method="get" id="searchform" class="searchform" action="<?php echo get_site_url(); ?>"> | |
<div> | |
<label class="screen-reader-text" for="s">Search for:</label> | |
<input type="text" value="<?php the_search_query(); ?>" name="s" id="s" /> | |
<?php wp_dropdown_categories( array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove Version Numbers for everything! | |
remove_action('wp_head', 'wp_generator'); | |
function sdt_remove_ver_css_js( $src, $handle ) | |
{ | |
$handles_with_version = [ 'style' ]; // <-- Adjust to your needs! | |
if ( strpos( $src, 'ver=' ) && ! in_array( $handle, $handles_with_version, true ) ) | |
$src = remove_query_arg( 'ver', $src ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<nav class="navbar navbar-default navbar-fixed-top"> | |
<div class="navbar-header"> | |
<button type="button" class="navbar-toggle" data-toggle="collapse"> | |
<span class="sr-only">Toggle navigation</span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
</button> | |
<a class="navbar-brand" href="#">Title</a> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if( have_rows('grade_repeat') ): ?> | |
<?php while ( have_rows('grade_repeat') ) : the_row(); ?> | |
<h3><?php the_sub_field('class_level'); ?></h3> | |
<?php if( have_rows('class_repeater') ): ?> | |
<?php while( have_rows('class_repeater') ): the_row(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.parallax-background { | |
background-color: #0078A0; | |
height: 620px; | |
background-repeat: no-repeat; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; | |
position: fixed; | |
width: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Tint */ | |
.tinted-image { | |
background: | |
/* top, transparent red, faked with gradient */ | |
linear-gradient( | |
rgba(255, 0, 0, 0.45), | |
rgba(255, 0, 0, 0.45) | |
), | |
/* bottom image */ | |
url(image.jpg); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Tabs with only CSS</title> | |
<style> | |
.container { | |
width:1080px; | |
margin: 0 auto; | |
} | |
.tab-container input{ | |
display:none; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Body Styles | |
.rtl {} | |
.home {} | |
.blog {} | |
.archive {} | |
.date {} | |
.search {} | |
.paged {} | |
.attachment {} | |
.error404 {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Register Menu in functions.php | |
*/ | |
add_action( 'after_setup_theme', 'register_my_menu' ); | |
function register_my_menu() { | |
register_nav_menu( 'primary', __( 'Primary Menu', 'theme-slug' ) ); | |
} |