Skip to content

Instantly share code, notes, and snippets.

View azizultex's full-sized avatar
🌍
Working from anywhere 😊

Azizul Haque azizultex

🌍
Working from anywhere 😊
View GitHub Profile
add_shortcode('multipage_form_sc','multipage_form');
function multipage_form(){
global $wpdb;
$this_page = $_SERVER['REQUEST_URI'];
$page = $_POST['page'];
if ( $page == NULL ) {
echo '<form method="post" action="' . $this_page .'">
<label for="first_name" id="first_name">First Name: </label>
<input type="text" name="first_name" id="first_name" />
<label for="last_name" id="last_name">Last Name: </label>
/** Add support for custom header */
add_theme_support( 'genesis-custom-header', array( 'width' => 960, 'height' => 80, 'textcolor' => '333333', 'admin_header_callback' => 'georgia_admin_style' ) );
/** Register a custom admin callback to display the custom header preview with the same style as is shown on the front end */
function georgia_admin_style() {
$headimg = sprintf( '.appearance_page_custom-header #headimg { background: url(%s) no-repeat; font-family: Georgia, Times, serif; min-height: %spx; }', get_header_image(), HEADER_IMAGE_HEIGHT );
$h1 = sprintf( '#headimg h1, #headimg h1 a { color: #%s; font-size: 30px; font-variant: small-caps; font-weight: normal; line-height: 36px; margin: 10px 0 0; text-decoration: none; }', esc_html( get_header_textcolor() ) );
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
</head>
<head>
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.10.2.min.js">
</script>
</head>
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
<!-- HTML codes -->
<a style="height:1200px;" id="ad_bg" href="your_targeted_link" target="_blank"><img src="yourimageurl" /></a>
/*CSS Codes --------------- */
#ad_bg{
top: 0;
left:0px;
@azizultex
azizultex / Custom Post type for Filterable Portfolio
Created April 26, 2014 07:37
Custom Post type for Filterable Portfolio
/*
* Add a portfolio custom post type.
*/
add_action('init', 'create_redvine_portfolio');
function create_redvine_portfolio()
{
$labels = array(
'name' => _x('Portfolio', 'portfolio'),
'singular_name' => _x('Portfolio', 'portfolio'),
'add_new' => _x('Add New', 'portfolio'),
@azizultex
azizultex / jquery isotop to activate filterable custom portfolio
Created April 26, 2014 07:45
jquery isotop to activate filterable custom portfolio
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/jquery.isotope.min.js"></script>
<script type="text/javascript">
(function($){
var $container = $('#portfolio'),
// create a clone that will be used for measuring container width
$containerProxy = $container.clone().empty().css({ visibility: 'hidden' });