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
<?xml version="1.0" encoding="UTF-8" ?> | |
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your site. --> | |
<!-- It contains information about your site's posts, pages, comments, categories, and other content. --> | |
<!-- You may use this file to transfer that content from one site to another. --> | |
<!-- This file is not intended to serve as a complete backup of your site. --> | |
<!-- To import this information into a WordPress site follow these steps: --> | |
<!-- 1. Log in to that site as an administrator. --> | |
<!-- 2. Go to Tools: Import in the WordPress admin panel. --> | |
<!-- 3. Install the "WordPress" importer from the list. --> |
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
// Note: the empty deps array [] means | |
// this useEffect will run once | |
// similar to componentDidMount() | |
useEffect(() => { | |
apiFetch( { path: '/wp/v2/users?roles=author,editor,administrator' } ) | |
.then ( | |
( users ) => { | |
setIsLoaded(true); | |
setUsers(users) |
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
/** | |
* React hook to manage state as block changes. | |
* This is used with setAttributes to set block settings | |
* | |
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-element/#usestate | |
*/ | |
import { useState } from '@wordpress/element'; |
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
{ | |
"modules": [ | |
{ | |
"publicize": { | |
"urls": { | |
"fb": "knotyart", | |
"instagram": "knotyart", | |
"twitter": "bestofglass" | |
}, | |
"autogreet": "Welcome to Knoty Art!", |
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
/** MyStyle: Show thumbnail in cart larger than default 32px **/ | |
.woocommerce-cart table.cart img { | |
width: auto; | |
min-width: 32px; | |
max-width: 100px; | |
} | |
@media(max-width:768px) { | |
/** Show thumbnail row in cart on mobile **/ | |
.woocommerce-page table.cart .product-thumbnail { |
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
<!-- Add this to the HTML Editor in Gutenberg (not the block editor) --> | |
<!-- source: https://gist.github.com/flexseth/2564bea3d080ecfa0f4d8e86654d1b5b | |
<!-- Must be running the Gutenberg plugin for this to work --> | |
<!-- wp:paragraph --> | |
<p><b>This is a sample page.</b></p> | |
<!-- /wp:paragraph --> | |
<!-- wp:paragraph --> | |
<p></p> |
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 /* Do NOT include the opening PHP tag | |
function itsme_disable_feed() { | |
wp_die( __( 'No feed available, please visit the <a href="'. esc_url( home_url( '/' ) ) .'">homepage</a>!' ) ); | |
} | |
add_action('do_feed', 'itsme_disable_feed', 1); | |
add_action('do_feed_rdf', 'itsme_disable_feed', 1); | |
add_action('do_feed_rss', 'itsme_disable_feed', 1); | |
add_action('do_feed_rss2', 'itsme_disable_feed', 1); |
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 | |
// Add product gallery support. | |
if ( class_exists( 'WooCommerce' ) ) { | |
add_theme_support( 'wc-product-gallery-lightbox' ); | |
add_theme_support( 'wc-product-gallery-slider' ); | |
add_theme_support( 'wc-product-gallery-zoom' ); | |
} |
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 | |
/* | |
* Change WooCommerce store notice text | |
* | |
*/ | |
function fp_replace_dismiss( $notice ){ | |
return str_replace( 'Dismiss', 'X', $notice ); | |
} | |
add_filter( 'woocommerce_demo_store','fp_replace_dismiss' ); |
NewerOlder