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 types to limit it to the same post type. | |
* | |
* @param array $post_types Array of post types included in WHERE clause | |
* @return array Updated array of post types | |
*/ | |
function crp_same_post_type( $post_types ) { | |
global $post; |
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 to override the censor character in Better Search. | |
* | |
* @param string Default censor string | |
* | |
* @return string Censored string | |
*/ | |
function filter_bsearch_censor_char( $censorChar ) { | |
return "*"; |
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 function forces all related / top ten posts are from the same language. | |
* | |
* @param bool $return_original_if_missing | |
*/ | |
function filter_return_ori( $return_original_if_missing ) { | |
return 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 | |
// Fixes to disregard Hidden products and to add Author Billing field to Better Search plugin queries | |
function filter_bsearch_posts_join( $join ) { | |
global $wpdb, $author_search; | |
$join .= " | |
INNER JOIN $wpdb->postmeta AS pm ON ($wpdb->posts.ID = pm.post_id) | |
"; | |
if ( $author_search ) { | |
$join .= " | |
INNER JOIN $wpdb->postmeta AS pma ON ($wpdb->posts.ID = pma.post_id) |
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
sudo find . -name '*.DS_Store' -type f -delete | |
sudo find . -name 'Thumbs.db' -type f -delete |
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
rsync -va --progress SourceFolder DestinationFolder |
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 example fetches the popular posts tracked by Top 10. | |
* | |
*/ | |
if ( function_exists( 'get_tptn_posts' ) ) { | |
$settings = array( | |
'daily' => 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
.crp_related ul { | |
display: grid; | |
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); | |
gap: 10px; | |
margin: 0; | |
justify-items: center; | |
list-style: none; | |
} | |
.crp_related ul li { | |
text-align:center; |
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
Sub NumberFormat() | |
' Range should be formatted as "TEXT";"TEXT" | |
Range("B2:B19").NumberFormat = Range("C2:C19").Value | |
End Sub |
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 example fetches the related posts and uses Ajax Load More to dynamically pull additional posts | |
* | |
*/ | |
global $post; | |
$features = get_crp_posts_id( array( | |
'postid' => $post->ID, |