Skip to content

Instantly share code, notes, and snippets.


Sangam Kumar Shrestha 2shrestha22

View GitHub Profile
View style.css
Theme Name: Twenty Thirteen Child
Theme URI:
Description: Twenty Thirteen Child Theme
Author: Any Name
Author URI:
Template: twentythirteen
Version: 1.0.0
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twenty-thirteen-child
View functions.php
function theme_enqueue_styles() {
$parent_style = 'twentythirteen-style';
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'twentythirteen-child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style )
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
View functions1.php
/* An example of enqueuing a child theme.... xyz=your parent theme direcrtory name, you can find it in wp-content/themes/ directory. */
function enqueue_my_styles() {
$parent_style = 'xyz-style';
// Gives value of variable xyz
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
// To enqueue parent theme css
2shrestha22 / foodhunt.txt
Last active Jul 18, 2018
code snippet to remove footer credits in Foodhunt by ThemeGrill. Put this in function.php
View foodhunt.txt
function remove_default_foodhunt_credits(){
add_filter('foodhunt_footer_copyright', 'foodhunt_custom_credits');
function foodhunt_custom_credits(){
$foodhunt_custom_credits = ""; //add here any text you want to put in footer credits
$credit_value ='<div class="copyright"><span class="copyright-text">Copyright &copy; ' . date('Y') . ' <a href="' . esc_url( home_url( '/' ) ) . '" title="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" ><span>' . get_bloginfo( 'name', 'display' ) . '.</span></a> ' .$foodhunt_custom_credits. '</span></div>';
echo $credit_value;
2shrestha22 / task.txt
Last active Oct 8, 2018
Opening .php files directly from VS Code
View task.txt
//run in chrome task
// See
// for the documentation about the tasks.json format
"version": "2.0.0",
"command": "chrome",
"tasks": [
"label": "Run in Chrome",
"windows": {
View jetpack-subscription.css
#blog_subscription-4 .widget-title{
padding: 15px;
display: block;
View customcss.css
pre {
color: white;
border-left: 6px solid #bbb;
padding:5px 10px;
background: rgb(105,105,105);
font-size: 14px;
margin-right: 50px;
pre::selection { color: #696969; background: rgba(255, 255, 255, 0.996);
2shrestha22 / flashfooter.php
Last active Aug 10, 2019
footer editor for flash theme (ThemeGrill)
View flashfooter.php
//copy below this line, you shouldn't include <?php
//paste this code in your function.php
//flash footer editor
if (! function_exists('flash_custom_credits')) {
function remove_default_flash_credits(){
View genesisfooter.txt
<img src="" height="60" alt=""><br>[footer_copyright] · <a href="" title="Sangam's Blog" ><span>Sangam's Blog</span></a> · <strong>ॐ</strong> · Hosted by <a rel="nofollow" href="" title="DigitalBerg">DigitalBerg</a><br><a href="//">About</a> · <a href="">Contact</a> · <a href="">Privacy Policy</a> · <a href="">Sitemap</a><!--
ॐ त्र्यम्बकं यजामहे सुगन्धिं पुष्टिवर्धनम् । उर्वारुकमिव बन्धनान् मृत्योर्मुक्षीय मामृतात् ॥
ॐ त्र्यम्बकं यजामहे सुगन्धिं पुष्टिवर्धनम् । उर्वारुकमिव बन्धनान् मृत्योर्मुक्षीय मामृतात् ॥
ॐ त्र्यम्बकं यजामहे सुगन्धिं पुष्टिवर्धनम् । उर्वारुकमिव बन्धनान् मृत्योर्मुक्षीय मामृतात् ॥
View mailchimpamp.html
<section id="enews-ext-3" class="enews-widget">
<div class="enews">
<div class="widget-wrap">
<form id="subscribeenews-ext-3" name="submit" method="post" action-xhr="" target="_top">
<p>Get awesome content delivered straight to your inbox. </p>
<input type="email" name="email" placeholder="Enter your email address" required="">
<input type="submit" value="Subscribe">
<div submitting>
<template type="amp-mustache">
Form submitting... Thank you for waiting.