Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Sangam Kumar Shrestha 2shrestha22

🎯
Focusing
View GitHub Profile
@2shrestha22
2shrestha22 / spfooter.php
Last active Apr 6, 2020
Removes Spacious Footer Credits With Your Own
View spfooter.php
<?php
//copy below this line, you shouldn't include <?php
//paste this code in your function.php
//spacious footer
if (! function_exists('spacious_custom_credits')) {
add_action('init','remove_default_credits');
function remove_default_credits(){
remove_action('spacious_footer_copyright','spacious_footer_copyright');
View style.css
Theme Name: Twenty Thirteen Child
Theme URI: http://example.com/wp-content/themes/twenty-thirteen-child/
Description: Twenty Thirteen Child Theme
Author: Any Name
Author URI: http://example.com
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
<?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
<?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
2shrestha22 / flashfooter.php
Last active Aug 10, 2019
footer editor for flash theme (ThemeGrill)
View flashfooter.php
<?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')) {
add_action('init','remove_default_flash_credits');
function remove_default_flash_credits(){
remove_action('flash_copyright_area','flash_footer_copyright');
@2shrestha22
2shrestha22 / sublime3-build3143.txt
Created Sep 26, 2017
Sublime Text 3 Build 3143 License Key
View sublime3-build3143.txt
—– BEGIN LICENSE —–
TwitterInc
200 User License
EA7E-890007
1D77F72E 390CDD93 4DCBA022 FAF60790
61AA12C0 A37081C5 D0316412 4584D136
94D7F7D4 95BC8C1C 527DA828 560BB037
D1EDDD8C AE7B379F 50C9D69D B35179EF
2FE898C4 8E4277A8 555CE714 E1FB0E43
D5D52613 C3D12E98 BC49967F 7652EED2
@2shrestha22
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
dd_action('init','remove_default_foodhunt_credits');
function remove_default_foodhunt_credits(){
remove_action('foodhunt_footer_copyright','foodhunt_footer_copyright');
}
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;
View apache-virtualhosts.conf
#modify necessary
<VirtualHost *:80>
DocumentRoot "D:/xampp/htdocs/"
ServerName localhost
</VirtualHost>
#we add this to make sure we can access to open PHPmyAdmin from http://localhost/phpmyadmin
#DocumentRoot - the root of the web server in your machine. In XAMPP it is ../xampp/htdocs/
<VirtualHost *:80>
@2shrestha22
2shrestha22 / task.txt
Last active Oct 8, 2018
Opening .php files directly from VS Code
View task.txt
{
//run in chrome task
// See https://go.microsoft.com/fwlink/?LinkId=733558
// 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{
display:none;
}
#subscribe-blog-blog_subscription-4{
color:white;
padding: 15px;
display: block;
background-color:#e8554e
}
You can’t perform that action at this time.