This file contains hidden or 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
add_filter('woocommerce_get_breadcrumb', 'addNewBreadcrumb'); | |
function addNewBreadcrumb($crumbs) | |
{ | |
array_splice($crumbs, 1, 0, [[__('New BreadCrumb'), home_url('/newbreadcrumb/')]]); | |
return $crumbs; | |
} |
This file contains hidden or 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
window.onload = function(){ | |
setTimeout(function() { | |
var ad = document.querySelector("ins.adsbygoogle"); | |
if (ad && ad.innerHTML.replace(/\s/g, "").length == 0) { | |
alert("Please don't use Ad blocker on this site."); | |
var x = document.createElement("IMG"); | |
x.setAttribute("src", "https://www.techmuzz.com/wp-content/uploads/2018/12/stop-ad-blockers.png"); | |
x.setAttribute("width", "750"); | |
x.setAttribute("height", "415"); | |
x.setAttribute("alt", "Please don't use Ad blocker for this site."); |
This file contains hidden or 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 excludeCatTechMuzz($query){ | |
if ( $query->is_home ) { | |
$query->set(‘cat’, ‘-1479’); //1479 is the category number | |
} | |
return $query; | |
} | |
add_filter(‘pre_get_posts’, ‘excludeCatTechMuzz’); |
This file contains hidden or 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 custom_scripts_styles_mobile_responsive() { | |
wp_enqueue_script( 'beautiful-responsive-menu', get_bloginfo( 'stylesheet_directory' ) . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' ); | |
wp_enqueue_style( 'dashicons' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'custom_scripts_styles_mobile_responsive' ); |
This file contains hidden or 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
<script> | |
$(function () { | |
var width = 0, | |
flipboard = document.getElementById('flipboard'); | |
width = flipboard.getBoundingClientRect().width ? flipboard.getBoundingClientRect().width : flipboard.offsetWidth; | |
if (width > 800) { | |
flipboard.innerHTML = '<iframe width="100%" frameborder="0" height="600px" marginheight="0" marginwidth="0" scrolling="no" src="https://flipboard.com/section/the-internet-of-things-bn8l9H"></iframe>' | |
} | |
})(); | |
</script> |
This file contains hidden or 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 | |
class IXR_Value | |
{ | |
var $data; | |
var $type; | |
function IXR_Value($data, $type = false) | |
{ | |
$this->data = $data; | |
if (!$type) { |
This file contains hidden or 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 techmuzz_navigation_links() { | |
if ( is_singular('post') ) { ?> | |
<div style="background: #eee; border: 1px solid #bbb;display:inline-block;padding:5px 10px 5px 10px;margin-bottom:10px;"> | |
<span class="nav-previous alignleft" style="width:45%;"> | |
<?php previous_post_link('<strong>%link</strong>', '<span style="color: #333;"><< Previous Post</span>', TRUE) ?><br/> | |
<?php previous_post_link('%link', '%title', TRUE) ?> | |
</span> | |
<span class="nav-next alignright" style="width:45%;"> | |
<?php next_post_link('<strong>%link</strong>', '<span style="color: #333;">Next Post >></span>', TRUE) ?><br/> | |
<?php next_post_link('%link', '%title', TRUE)?> |
This file contains hidden or 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 remove_archive_body_class( $classes ) { | |
if ( is_archive() ) { | |
foreach ( $classes as $key => $value ) { | |
if ( $value == 'archive' ) unset( $classes[$key] ); | |
} | |
} | |
return $classes; | |
} | |
add_filter( 'body_class', 'remove_archive_body_class', 20, 2 ); |
This file contains hidden or 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 avatar_with_site_title() { | |
echo get_avatar( '[email protected]', 150 ); | |
} | |
add_action( 'genesis_site_title', 'avatar_with_site_title', 0 ); |
This file contains hidden or 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 logo_with_title() { | |
$imageUrl = get_stylesheet_directory_uri() . '/images/site_logo.png'; | |
printf( '<a href="%s"><img src="%s" /></a>', trailingslashit( home_url() ), $imageUrl ); | |
} | |
add_action( 'genesis_site_title', 'logo_with_title', 0 ); |
NewerOlder