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 | |
/* | |
Theme Name: Twenty Fifteen Child | |
Theme URI: http://example.com/twenty-fifteen-child/ | |
Description: Twenty Fifteen Child Theme | |
Author: John Doe | |
Author URI: http://example.com | |
Template: twentyfifteen | |
Version: 1.0.0 | |
License: GNU General Public License v2 or later |
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
As you know we’ve redesigned the product gallery feature in WooCommerce to deliver a richer experience in 3.0. | |
This is a significant frontend change that can be broken down in to three separate new features; | |
Image zoom / magnification | |
Lightbox | |
Slider | |
To enable each of these features in your theme you must declare support using add_theme_support() like so; | |
add_action( 'after_setup_theme', 'yourtheme_setup' ); |
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="searchBox"> | |
<input type="text" class="searchInput" placeholder="Search"> | |
<div class="searchHandle"></div> | |
</div> | |
----------------- | |
*{ | |
box-sizing: border-box; | |
} |
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 | |
function my_styles_scripts_method(){ | |
// load main style.css | |
wp_enqueue_style('main_style', get_stylesheet_uri()); | |
//load aditional css file | |
wp_enqueue_style('default_style', get_template_directory_uri().'/assets/css/default.css'); | |
wp_enqueue_style('layout_style', get_template_directory_uri().'/assets/css/layout.css'); | |
wp_enqueue_style('media_queries_style', get_template_directory_uri().'/assets/css/media-queries.css'); | |
// load scripts |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Marker Leaflet Map</title> | |
<meta charset="utf-8" /> | |
<link | |
rel="stylesheet" | |
href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css" | |
/> | |
</head> |
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 | |
// Register Custom Post Type in functions.php | |
add_action( 'pre_get_posts', 'add_my_post_types_to_query' ); | |
function add_my_post_types_to_query( $query ) { | |
if ( is_home() && $query->is_main_query() ) | |
$query->set( 'post_type', array( 'post', 'movies' ) ); | |
return $query; | |
} |
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
/* | |
!wp-content/ | |
.* | |
!.gitignore | |
!readme.md | |
~* |
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 | |
// in functions.php create the CUSTOM POST TYPE | |
// create CPT = reviews | |
add_action('init', 'my_first_post_type'); | |
function my_first_post_type() | |
{ | |
// for thumbnails to be recognised | |
add_theme_support('post-thumbnails'); | |
// CPT reviews | |
register_post_type('reviews', [ |
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
// ------------------------------------ | |
// Hide the element untill page loaded | |
// ------------------------------------ | |
// HTML | |
<div id="my-modals" class="hide"> | |
// CSS | |
.hide { | |
dislplay:none; |
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 id="main-slider" class="carousel slide mt-4" data-ride="carousel"> | |
<?php $args = array( | |
'posts_per_page' => 5, | |
'tag' => 'slider' | |
); | |
$slider = new WP_Query($args); | |
if($slider->have_posts()): | |
$count = $slider->found_posts; | |
?> |