Skip to content

Instantly share code, notes, and snippets.

Ritesh Saini heyitsritesh

Block or report user

Report or block heyitsritesh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@heyitsritesh
heyitsritesh / Execute Shortcode in Genesis Breadcrumbs
Created Nov 8, 2019
Execute Shortcode in Genesis Breadcrumbs
View Execute Shortcode in Genesis Breadcrumbs
/* Execute shortcodes in Genesis Breadcrumbs */
add_filter( 'genesis_single_crumb', 'do_shortcode' );
View Add target="_blank" To WordPress Author Profile Bio Links
View Remove URL Field From GeneratePress Comments Section
/* Remove URL Field From GeneratePress Comments Section */
add_action( 'after_setup_theme', 'gp_add_comment_url_filter' );
function gp_add_comment_url_filter() {
add_filter( 'comment_form_default_fields', 'gp_disable_comment_url', 20 );
}
function gp_disable_comment_url($fields) {
unset($fields['url']);
return $fields;
}
@heyitsritesh
heyitsritesh / Redirect All 404 Pages to Homepage in WordPress
Last active Oct 25, 2019
Redirect All 404 Pages to Homepage in WordPress
View Redirect All 404 Pages to Homepage in WordPress
/* Redirect All 404 Pages to Homepage in WordPress by DigitalKube.com */
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".get_bloginfo('url'));
exit();
?>
View Display AdSense Auto Ads Only On Specific Pages In WordPress
//*** Auto Ads on Single Posts ***//
add_action( 'wp_head', 'digitalkube_add_tracking_code' );
function digitalkube_add_tracking_code() {
if (is_single()) {
?>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-xxxxxxxxxxxxxxx",
enable_page_level_ads: true
View Fix Google AdSense Crawl Errors for WordPress using Robots.txt file
User-agent: *
Disallow: /cgi-bin/
Disallow: /wp-admin/
Disallow: /wp-content/
Disallow: /wp-includes/
Disallow: /archives/
Disallow: /comments/feed/
Disallow: /trackback/
Disallow: /index.php
Disallow: /xmlrpc.php
View Disabling Auto-Link in WordPress Comments
View Install HTTrack Mac
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
@heyitsritesh
heyitsritesh / Erase_Cache.bat
Last active Jul 16, 2018
How To Clear Windows 10 Update Cache In Just One-Click | https://www.digitalkube.com/clear-windows-10-update-cache/
View Erase_Cache.bat
net stop wuauserv
CD %Windir%
CD SoftwareDistribution
DEL /F /S /Q Download
net start wuauserv
View next-prev-links-comment-form-genesis.php
You can’t perform that action at this time.