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
/* CSS for different templates, some examples below */ | |
.post-type-page.sky-full-width .editor-styles-wrapper { | |
padding-bottom: var(--wp--preset--spacing--80); | |
background-color: var(--wp--preset--color--sky); | |
background-image: url("../images/[email protected]"); | |
background-size: 300px 300px; | |
} | |
.post-type-page:not(.default-page-template) .editor-styles-wrapper .nt-page__content-wrap { |
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 | |
/** | |
* Enqueue the JS file. | |
* | |
* @since 1.0.0 | |
* | |
* @return void | |
*/ | |
function clientname_styles_and_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
<?php/** | |
* Set Header Colour on pages based on first block's colour | |
* | |
* @link https://developer.wordpress.org/reference/functions/body_class/ | |
*/ | |
function client_header_body_classes( $classes ) { | |
// page header colours | |
if ( is_page() && !is_page( 'Blog' ) ) { |
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
/** | |
* Include variable for ImageDateTitle icon from core. Used in the Query Block Variation below | |
*/ | |
const external_wp_element_namespaceObject = window["wp"]["element"]; | |
const external_wp_components_namespaceObject = window["wp"]["components"]; | |
const imageDateTitle = (0, external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, { | |
xmlns: "http://www.w3.org/2000/svg", | |
viewBox: "0 0 48 48" | |
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, { |
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: customer-completed-order.php | |
* | |
* Customize the email to include a member card. | |
* | |
* @link https://businessbloomer.com/woocommerce-check-product-id-order/ | |
* | |
*/ |
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 | |
/** | |
* The WooCommerce Template | |
* | |
* This is the template that displays all WooCommerce pages by default. | |
* | |
* @package THEMENAME | |
*/ | |
get_header(); ?> |
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 // Reference: https://codex.wordpress.org/Conditional_Tags | |
// Use conditional PHP tags to ouput different content based on the template in use?> | |
<?php if ( is_page ) ) : // check if we are on a page ?> | |
<?php // code here for display on pages ?> | |
<?php else : // code below runs if we are NOT on a page ?> | |
<?php // code here displays on anything that is NOT a page ?> |
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 | |
$images = get_field('hero_home_images'); | |
if( $images ): | |
shuffle($images); // randomizes the image array | |
$max = 1; // set the max here; | |
$count = 0; // current count | |
?> | |
<?php | |
foreach( $images as $image ): | |
$count++; // increment count |
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
/* This will style the default page titles just like the category page titles */ | |
.page .entry-title { | |
font-size: 13px; | |
letter-spacing: 1px; | |
color: #ffffff; | |
background-color: #000000; | |
margin-bottom: 0px; | |
padding: 5px 0px; | |
text-align: center; |
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 | |
/** | |
* Controlling the class on an article in the WordPress loop | |
* Notes: | |
* | |
* <?php post_class(); ?> - this outputs the WordPress generated class for categories | |
* You can add classes by adding them inside this function. It will still output the WordPress classes | |
* | |
*/ | |
?> |
NewerOlder