View multilingualpress-cross-post-type.php
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 the post search arguments allow for cross-post-type connections. | |
* | |
* @param array $args the WP_Query arguments used. | |
* @return array | |
*/ | |
function remote_post_search_arguments( $args ) { | |
$translated_post_types = array( 'post', 'page', 'product' ); |
View multilingualpress-filter-draft-hreflangs.php
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 the hreflang urls and remove any that are indicative of draft or otherwise non-published content. | |
* | |
* Linked translations that are not yet published will show up as /?p=123 instead of pretty permalink. | |
* | |
* @param array $urls the array of language => url hreflang urls. | |
* @return array | |
*/ | |
add_filter( 'multilingualpress.hreflang_translations', 'filter_mlp_hreflang_translations' ); |
View stf-jquery-header-in-archives-only.php
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 | |
/** | |
* Use this filter to force jquery to remain in the head section of the page on archives. | |
* | |
* @see https://wordpress.org/support/topic/exclude-jquery-for-other-archive-pages/ | |
* @date 2021-07-02 | |
*/ | |
add_filter( 'stf_jquery_header', 'jdn_archive_header_scripts', 10 ); | |
function jdn_archive_header_scripts( $bool ) { |
View add-yoast-redirect.php
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 | |
/** | |
* Create a new redirect within the Yoast redirect system. | |
* | |
* @param string $origin_url redirecting from. | |
* @param string $destination_url redirecting to. | |
* @param int $type redirect code, defaults to 301. | |
* @param string $format the format, either 'plain' or 'regex', defaults to 'plain'. | |
* @return void | |
*/ |
View remove-genesis-layout-settings-from-customizer.php
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 layout settings from customizer | |
add_filter( 'genesis_customizer_theme_settings_config', 'jdn_filter_genesis_customizer_theme_settings' ); | |
function jdn_filter_genesis_customizer_theme_settings( $config ) { | |
if( isset( $config['genesis']['sections']['genesis_layout'] ) ) | |
unset( $config['genesis']['sections']['genesis_layout'] ); | |
return $config; |
View grid-block.scss
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
.grid-block { | |
float: left; | |
} | |
.grid { | |
$grid-gap: 9px; | |
// Columns! | |
@media screen and ( min-width: 600px ) { // responsive grid | |
display: grid; |
View change-wp-user-password.sql
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 wp_users | |
SET user_pass = MD5('newpassword') | |
WHERE ID = 55; |
View custom-route-notification-multiple-fields.php
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 the sent to email address in the notification | |
* | |
* @author Joshua David Nelson, josh@joshuadnelson.com | |
**/ | |
// Route to user address from drop down list, update the '1' to the ID of your form | |
add_filter( 'gform_notification_1', 'route_user_email_notification', 10, 3 ); | |
function route_user_email_notification( $notification, $form , $entry ) { | |
NewerOlder