Skip to content

Instantly share code, notes, and snippets.

View Asikur22's full-sized avatar
💜
Web Developer | In Love with WordPress

Asiqur Rahman Asikur22

💜
Web Developer | In Love with WordPress
View GitHub Profile
@Asikur22
Asikur22 / related-posts-2.php
Last active December 26, 2019 21:34 — forked from raselahmed7/related-posts.php
[WordPress Related Post]
@Asikur22
Asikur22 / function.php
Last active April 10, 2019 14:21 — forked from raselahmed7/enable-masonry.php
[Enable Built-In JavaScript Masonry in WordPress] #Enqueue #Scripts
function jk_masonry() {
wp_enqueue_script( 'jquery-masonry', array( 'jquery' ) );
}
add_action( 'wp_enqueue_scripts', 'jk_masonry' );
/*
How to use?
$('#container').masonry({ singleMode: true });
@Asikur22
Asikur22 / page.php
Last active April 10, 2019 15:28 — forked from raselahmed7/homepage-only
[WordPress Homepage Only] #ConditionalTag
<?php if( is_home() || is_front_page() ) : ?>
<!-- Homepage Only Code -->
<?php else : ?>
<!-- Other Page Code -->
<?php endif; ?>
@Asikur22
Asikur22 / arrayzing.md
Last active April 10, 2019 16:00 — forked from ourmaninamsterdam/LICENSE
Arrayzing - The JavaScript array cheatsheet
@Asikur22
Asikur22 / PHP Array of Animate.css animation styles
Last active April 10, 2019 14:58 — forked from ohid/PHP Array of Animate.css animation styles
[A PHP Array of all animation style names from animate.css] #AnimateCSS
$animations = array(
'bounce' => 'bounce',
'flash' => 'flash',
'pulse' => 'pulse',
'rubberBand' => 'rubberBand',
'shake' => 'shake',
'swing' => 'swing',
'tada' => 'tada',
'wobble' => 'wobble',
'jello' => 'jello',
@Asikur22
Asikur22 / ContextCmder-Disable.reg
Last active April 10, 2019 14:56 — forked from jojobyte/ContextCmder-Disable.reg
[Cmder Context (Right-Click) Menu Item for Windows] #cmd #Registry
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder]
@Asikur22
Asikur22 / functions.php
Last active December 9, 2023 16:31 — forked from chrisrouse/Show Feature Image on Post Admin
Add column to Admin Table show the feature image of a post.
<?php
/*
* Adds the new column to the Admin Post View as the first column.
*/
function my_columns_filter( $columns ) {
$column_thumbnail = array( 'thumbnail' => 'Thumbnail' );
$columns = array_slice( $columns, 0, 1, true ) + $column_thumbnail + array_slice( $columns, 1, null, true );
return $columns;
}
@Asikur22
Asikur22 / functions.php
Last active August 18, 2019 15:02 — forked from thangman22/register.js
Workbox for Wordpress
/*
* Register Service Worker
*/
function register_my_service_worker () {
echo "<script>'serviceWorker' in navigator ? navigator.serviceWorker.register('/sw.js') : console.log('Service Worker Not Activated.');</script>";
}
add_action ( 'wp_head', 'register_my_service_worker' );
@Asikur22
Asikur22 / customizer-links.php
Created September 1, 2019 04:21 — forked from slushman/customizer-links.php
How to link into the WordPress Customizer
@Asikur22
Asikur22 / WP Customizer - Text
Last active November 15, 2019 18:18 — forked from ajskelton/WP Customizer - Text
Add a Text field to the WordPress Customizer.
$wp_customize->add_setting( 'themeslug_text_setting_id', array(
'capability' => 'edit_theme_options',
'default' => 'Lorem Ipsum',
'sanitize_callback' => 'sanitize_text_field',
) );
$wp_customize->add_control( 'themeslug_text_setting_id', array(
'type' => 'text',
'section' => 'custom_section', // Add a default or your own section
'label' => __( 'Custom Text' ),