Skip to content

Instantly share code, notes, and snippets.

View sarathlal-old's full-sized avatar
🎯
Focusing

Sarathlal N sarathlal-old

🎯
Focusing
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>HTML tags with lorem ipsum</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css">
<!-- begin custom related loop, isa -->
<?php
// get the custom post type's taxonomy terms
$custom_taxterms = wp_get_object_terms( $post->ID, 'your_taxonomy', array('fields' => 'ids') );
// arguments
$args = array(
'post_type' => 'your_custom_post_type',
<?php if(has_site_icon()) { ?>
<link rel="icon" href="<?php echo get_site_icon_url("32"); ?>" sizes="32x32" />
<link rel="icon" href="<?php echo get_site_icon_url("192"); ?>" sizes="192x192" />
<link rel="apple-touch-icon-precomposed" href="<?php echo get_site_icon_url("180"); ?>" />
<meta name="msapplication-TileImage" content="<?php echo get_site_icon_url("270"); ?>" />
<?php } ?>
First add below code in theme's functions.php file
//Add logo support
function theme_prefix_setup() {
add_theme_support( 'custom-logo', array(
'height' => 60,
'width' => 200,
'flex-width' => true,
) );
}
function ghjut35_script() {
if(is_singular('product')){
?>
<script type="text/javascript">
function QueryStringToJSON() {
var pairs = location.search.slice(1).split('&');
var result = {};
pairs.forEach(function(pair) {
pair = pair.split('=');
//Update malamutename
function malamutename_acf_load_field( $field ) {
$malamutename = htmlspecialchars($_GET["malamutename"]); //get URL query string - malamutename
$field['default_value'] = $malamutename;
return $field;
}
add_filter('acf/load_field/name=malamutename', 'malamutemame_acf_load_field'); //acf/load_field/name=yourfieldname
//Update sira
function sire_acf_load_field( $field ) {
add_filter('wp_mail_from', 'notification_from_email');
add_filter('wp_mail_from_name', 'notification_from_name');
function notification_from_email($email_address){
$blog_url = get_site_url();
$output1 = str_replace(array('http://','https://', 'www'), '', $blog_url);
$output2 = strstr($output1, '/', true);
if($email_address === "wordpress@" . $output2)
return 'noreply@'. $output2;
<?php
/*
Plugin Name: Custom User Registration Notification
Description: Customized User registration notification
Version: 1.0
Author: Sarathlal N
Author URI: http://sarathlal.com
*/
// Redefine user notification function
# Hide Yoast Meta boxes in unnecessary post type
function remove_yoast_metabox_reservations(){
remove_meta_box('wpseo_meta', 'your_post_type', 'normal');
}
add_action( 'add_meta_boxes', 'remove_yoast_metabox_reservations',100 );