This file contains hidden or 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
*-------------- Creating custom menu with BEM classes :) ----------------*/ | |
// Change main menu parameters | |
add_filter( 'wp_nav_menu_args', 'filter_wp_menu_args' ); | |
function filter_wp_menu_args( $args ) { | |
if ( $args['theme_location'] === 'header-menu' || 'blog-menu' ) { | |
$args['container'] = false; | |
$args['items_wrap'] = '<ul class="%2$s">%3$s</ul>'; | |
$args['menu_class'] = 'menu__list'; | |
} |
This file contains hidden or 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
/*--------------- Register post type --------------------*/ | |
function create_post_type() { | |
//Register post type Team | |
register_post_type( 'team', | |
array( | |
'labels' => array( | |
'name' => __( 'Team' ), | |
'singular_name' => __( 'Team-member' ), | |
'add_new' => __('Add team-member'), | |
), |
This file contains hidden or 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
/*---------------invisible tag -more- link text in posts----------------*/ | |
add_filter( 'the_content_more_link', '__return_empty_string' ); |
This file contains hidden or 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
<!-- hero-slider--> | |
<section class="hero-slider"> | |
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); // start if and while ?> | |
<!--code for slider images --> | |
<div class="hero-slider__images owl-carousel"> | |
<?php if ( get_post_gallery() ) : | |
$gallery = get_post_gallery( get_the_ID(), false );?> | |
<!-- Loop through all the image and output them one by one --> | |
<?php foreach( $gallery['src'] as $src ) : ?> | |
<div class="hero-slider__item item" style="background-image: url(<?php echo $src;?>);"></div> |
This file contains hidden or 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 | |
/* | |
Template Name: Home | |
*/ | |
?> | |
<!-- header --> | |
<?php get_header(); ?> | |
<!-- loop with litle and content --> | |
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); // start if and while ?> |
This file contains hidden or 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
@mixin circle($width, $border-width, $color) { | |
width: $width; | |
height: $width; | |
border: $border-width solid $color; | |
-webkit-border-radius: $width/2; | |
-moz-border-radius: $width/2; | |
border-radius: $width/2; | |
} |
This file contains hidden or 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
<section class="team" id="team"> | |
<div class="row"> | |
<?php $args = array ( | |
'post_type' => 'team', | |
'posts_per_page' => -1, | |
'order' => 'ASC' | |
); | |
$team_query = new WP_Query( $args ); ?> |
This file contains hidden or 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('features_block_list') ): ?> | |
<div class="row"> | |
<?php while( have_rows('features_block_list') ): the_row(); | |
// vars | |
$icon = get_sub_field('features_block_icon'); | |
$title = get_sub_field('features_block_title'); | |
$text = get_sub_field('features_block_text');?> | |
<div class="column medium-6 large-3"> | |
<div class="features__item icon-with-text"> |
This file contains hidden or 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
<div class="photo-with-text__social-icons social-icons"> | |
<?php if( have_rows('team_social_links') ): ?> | |
<ul class="social-icons__list"> | |
<?php while( have_rows('team_social_links') ): the_row(); | |
// vars | |
$icon = get_sub_field('social_icon'); | |
$link = get_sub_field('social_link');?> | |
<?php | |
if( $link ): | |
$link_url = $link['url']; |
This file contains hidden or 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 | |
// Load scripts and styles | |
function add_scripts_and_styles() { | |
if ( ! is_admin() ) { | |
// For styles | |
wp_enqueue_style( 'main-style', get_template_directory_uri() . '/style.css', null, null ); | |
// For scripts (js) | |
wp_enqueue_script('jquery'); | |
wp_enqueue_script( 'main-js', get_template_directory_uri() . '/js/main.js', null, null, true ); | |
// Map |
OlderNewer