Skip to content

Instantly share code, notes, and snippets.

View iammahmudur's full-sized avatar

Md Mahmudur Rahman iammahmudur

View GitHub Profile
@iammahmudur
iammahmudur / jamacob.css
Last active August 29, 2019 15:38
Custom CSS for Gravity Forms
#input_18_74, #input_18_69{
border: none !important;
margin: 0 0 0.2em !important;
padding-left: 0 !important;
}
#field_18_74 .ginput_container, #field_18_69 .ginput_container{
padding-left: 0 !important;
}
/**
* Pagination function
*
* @param int $max_num_pages
*/
function my_pagination( $max_num_pages = 0 ) {
// get total number of pages
global $wp_query;
$max_num_pages = ( $max_num_pages > 0 ) ? $max_num_pages : $wp_query->max_num_pages;
@iammahmudur
iammahmudur / admin-post.js
Created May 3, 2013 04:47
This will replace the word 'term' with taxonomy name. Plugin: http://wordpress.org/extend/plugins/cpt-onomies/ File: js\admin-post.js Line: 236 Example: https://www.diigo.com/item/image/3wpgc/uyow
// set error message
$cpt_onomies_add_tag_error_message = cpt_onomies_admin_post_L10n.term_does_not_exist.replace( /term/g, $taxonomy ) + ' <a href="post-new.php?post_type=' + $taxonomy + '" target="_blank">' + cpt_onomies_admin_post_L10n.add_a_term.replace( 'term', ' new ' + $taxonomy ) + '</a>';
@iammahmudur
iammahmudur / wp_config.php
Created September 26, 2012 04:48 — forked from franz-josef-kaiser/wp_config.php
Example from wp_config.php (wordpress config file) that shows different environments
/**
* Production, Staging, Live
*/
define( 'OXO_LOCAL_A', '/wordpress/' );
define( 'OXO_STAGE', 'some-stage.domain.com' );
if ( substr($_SERVER['REQUEST_URI'], 0, 11) == OXO_LOCAL_A )
{
// DB
define( 'DB_NAME', 'wordpress' );