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
/** | |
* @type {string[]} Array of block names that should be excluded from the layout settings. | |
*/ | |
const haystack = ['core/group']; | |
wp.hooks.addFilter( | |
'blocks.registerBlockType', | |
'lh/fseFixes/layoutSettings', | |
(settings, name) => { | |
if (!haystack.includes(name)) { |
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
/************************************************ | |
Audio Blocks | |
************************************************/ | |
.wp-block-audio { | |
margin-left: 0px; | |
margin-right: 0px; | |
} | |
.wp-block-audio audio { | |
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
<?php | |
/** | |
* Override default WooCommerce templates and template parts from plugin. | |
* | |
* E.g. | |
* Override template 'woocommerce/loop/result-count.php' with 'my-plugin/woocommerce/loop/result-count.php'. | |
* Override template part 'woocommerce/content-product.php' with 'my-plugin/woocommerce/content-product.php'. | |
* | |
* Note: We used folder name 'woocommerce' in plugin to override all woocommerce templates and template parts. | |
* You can change it as per your requirement. |
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
// This example will add a custom "select" drop down to the "Image Box" | |
// This will change the class="" on the rendered image box so we can style the Image Box differently | |
// based on the selected option from the editor. | |
// The class will be "my-image-box-style-blue" or "my-image-box-style-green" based on the selected option. | |
add_action('elementor/element/before_section_end', function( $section, $section_id, $args ) { | |
if( $section->get_name() == 'image-box' && $section_id == 'section_image' ){ | |
// we are at the end of the "section_image" area of the "image-box" | |
$section->add_control( |
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_filter( 'wp_link_query', 'seren_wp_link_query_term_linking', 99, 2 ); | |
function seren_wp_link_query_term_linking( $results, $query ) { | |
// Query taxonomy terms. | |
$taxonomies = get_taxonomies( array( 'show_in_nav_menus' => true ), 'names' ); | |
$terms = get_terms( $taxonomies, array( | |
'name__like' => $query['s'], | |
'number' => 20, |
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
# force HTTPS and www. | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} (?!^www\.)^(.+)$ [OR] | |
RewriteCond %{HTTPS} off | |
RewriteRule ^ https://www.%1%{REQUEST_URI} [R=301,L] | |
# alternative way | |
RewriteCond %{HTTP_HOST} !^$ | |
RewriteCond %{HTTP_HOST} !^www\. [NC] |
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 | |
/* usage | |
* | |
* wp_nav_menu( array( | |
* 'theme_location' => 'primary', | |
* 'sub_menu' => true, | |
* 'root_id' => id_of_menu_item | |
* ) ); | |
*/ |
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 | |
/** | |
* Plugin Name: WooCommerce Category Images Modification | |
* Plugin URI: http://blog.ashfame.com/?p=1117 | |
* Description: Use product image as its category image on category archive pages (To override image for product category, upload one for that category and it will override) | |
* Author: Ashfame | |
* Version: 0.1.2 | |
* Author URI: http://ashfame.com/ | |
*/ |
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 | |
/** | |
* This file adds the SearchWP Images template to your theme. | |
* | |
* Template Name: SearchWP Images | |
* | |
* @author Robert Neu | |
* @package Genesis | |
* @subpackage SearchWP | |
*/ |
NewerOlder