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
//* Reposition the footer widgets | |
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' ); | |
add_action( 'genesis_after', 'genesis_footer_widget_areas' ); | |
//* Reposition the footer | |
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 ); | |
remove_action( 'genesis_footer', 'genesis_do_footer' ); | |
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 ); | |
add_action( 'genesis_after', 'genesis_footer_markup_open', 11 ); | |
add_action( 'genesis_after', 'genesis_do_footer', 12 ); |
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
/** | |
* new WordPress Widget format | |
* Wordpress 2.8 and above | |
* @see http://codex.wordpress.org/Widgets_API#Developing_Widgets | |
*/ | |
class PREFIX_Name_Widget extends WP_Widget { | |
/** | |
* Constructor | |
* |
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
{ | |
"update_check": false, | |
"always_show_minimap_viewport": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"font_face": "Roboto Mono", | |
"font_options": | |
[ | |
"gray_antialias", |
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
1. Archive Page - https://businessbloomer.com/woocommerce-visual-hook-guide-archiveshopcat-page | |
2. Single Page - https://businessbloomer.com/woocommerce-visual-hook-guide-single-product-page | |
3. Docs/hooks - https://docs.woocommerce.com/wc-apidocs/hook-docs.html | |
4. Video course - https://coursehunters.net/course/woocommerce |
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
function acf_load_cats_choices( $field ) { | |
// reset choices | |
$field['choices'] = array(); | |
// get the textarea value from options page without any formatting | |
$choices = get_hubspot_data( false, true ); | |
// loop through array and add to field 'choices' | |
if ( is_array( $choices ) ) { | |
$field['choices']['0'] = 'All'; | |
foreach ( $choices['topics'] as $key => $choice ) { |
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
//Ajax load more posts | |
add_action( 'wp_ajax_load_more', 'load_more_callback' ); | |
add_action( 'wp_ajax_nopriv_load_more', 'load_more_callback' ); | |
function load_more_callback() { | |
$news = new WP_Query( array( | |
'post_type' => 'clients_cpt', | |
'order' => 'DESC', | |
'orderby' => 'date', | |
'posts_per_page' => $_POST['perpage'], |
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
//Once string display | |
function once_str($string = '') { | |
static $foo_called = false; | |
if ($foo_called) return; | |
$foo_called = true; | |
echo $string; | |
} |
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
//Way 1. | |
<?php if (have_posts()) : ?> | |
<?php while (have_posts()) : the_post(); | |
global $post; | |
$parent_page = wp_get_post_parent_id(get_the_ID()); ?> | |
<?php $arg = array( | |
'post_type' => 'page', | |
'order' => 'ASC', | |
'orderby' => 'title', |
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 | |
$term_id = 10; | |
$taxonomy_name = 'products'; | |
$term_children = get_term_children( $term_id, $taxonomy_name ); | |
echo '<ul>'; | |
foreach ( $term_children as $child ) { | |
$term = get_term_by( 'id', $child, $taxonomy_name ); | |
echo '<li><a href="' . get_term_link( $child, $taxonomy_name ) . '">' . $term->name . '</a></li>'; | |
} |
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
$event_date = get_field('event_date'); | |
$dates = explode(' ', $event_date); | |
$dateObj = DateTime::createFromFormat('!d/m/Y', $dates[0]); | |
$monthName = $dateObj->format('F'); | |
$monthName_M = $dateObj->format('M'); | |
$dayNumber = $dateObj->format('d'); | |
$dayName = $dateObj->format('l'); | |
$yearName = $dateObj->format('Y'); |