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 | |
/** Template for displaying single posts. | |
* | |
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post | |
*/ | |
// Theme template stuff | |
// Blah blah | |
the_loop() |
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 | |
/** | |
* Get a reusable block by its title. | |
* | |
* @param string $title The post title of the reusable block. | |
* @param bool $filter_results Whether the results should be filtered through the_content filter. | |
* @return string|null The reusable block content if found, null otherwise. | |
*/ | |
function get_reusable_block( $title, $filter_results = true ) { |
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 | |
/** | |
* Filter breadcrumbs on Salary Data pages. | |
* | |
* @param array $link The link array. | |
* @param array $breadcrumb The breadcrumb item array. | |
* | |
* @return str $link The link output. | |
*/ | |
function zg_add_text_to_breadcrumb( $link, $breadcrumb ) { |
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
#!/bin/bash | |
# | |
# Declare SITES as an associative array | |
declare -A SITES | |
# Format: SITES[WPMDB profile number]=backup_filename_base | |
SITES[1]=remote_backup_com | |
#SITES[2]=another_site_to_backup | |
#SITES[3]=my_other_blog | |
## These variables will be specific to the WordPress |
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 | |
/** | |
* Gets an alternate template path for Genesis Custom Blocks. | |
* | |
* This is handy if you want to include GCB blocks in a plugin versus your theme. | |
* @param string $path The template path. | |
* @return string An alternate template path. | |
*/ | |
function ccb_get_alternate_template_path( $path ) { |
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 //remove this line | |
add_filter( 'simple_social_default_profiles', 'biw_add_new_simple_icon' ); | |
/** | |
* Add Houzz icon to Simple Social Icons plugin. | |
* | |
* @param array $icons Social icons to include in widget options. | |
* | |
* @return array Updated icon set. | |
*/ |
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
.wp-block-embed figcaption { | |
margin-top: .5em; | |
color: #6c7781; | |
text-align: center; | |
font-size: 13px | |
} | |
.editor-block-list__block[data-type="core/embed"][data-align=left] .editor-block-list__block-edit, | |
.editor-block-list__block[data-type="core/embed"][data-align=right] .editor-block-list__block-edit, | |
.wp-block-embed.alignleft, |
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 | |
/** | |
* Template Name: Category Archives | |
*/ | |
add_action( 'genesis_loop', 'custom_category_loop' ); | |
/** | |
* Custom loop that display a list of categories with corresponding posts. | |
*/ | |
function custom_category_loop() { |
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 | |
// Force full-width-content layout. | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); | |
// Move post info. | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); | |
add_action( 'genesis_entry_footer', 'genesis_post_info' ); | |
// Remove post content |
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_action( 'pre_get_posts', 'cd_show_all_posts' ); | |
/** | |
* Show all posts on a specified archive page. | |
* | |
* @author Carrie Dils | |
* @link https://carriedils.com/genesis-archive-page/ | |
* @param object $query data | |
* |
NewerOlder