Skip to content

Instantly share code, notes, and snippets.

View amitabhaghosh197's full-sized avatar

amitabha ghosh amitabhaghosh197

View GitHub Profile
@amitabhaghosh197
amitabhaghosh197 / register-post-type.php
Last active September 9, 2017 19:01 — forked from justintadlock/register-post-type.php
Wordpress Custom Post types #wordpress #custom-post
<?php
/* Register custom post types on the 'init' hook. */
add_action( 'init', 'my_register_post_types' );
/**
* Registers post types needed by the plugin.
*
* @since 0.1.0
* @access public
@amitabhaghosh197
amitabhaghosh197 / default-wordpress-style
Last active September 9, 2017 19:00
Wordpress default CSS styles must include #wordpress #css
.alignleft {
display: inline;
float: left;
margin-right: 1.5em;
}
.alignright {
display: inline;
float: right;
margin-left: 1.5em;
}
@amitabhaghosh197
amitabhaghosh197 / Readme
Created May 29, 2014 19:07
Two Navs with Bootstrap framework
The two navs are seperated by id s #first & #second. in the index.html file
The btn btn-navbar is styled with font-awesome iconic font. So it is styled in the responsive.css
@amitabhaghosh197
amitabhaghosh197 / full-streched-banner-image
Last active August 29, 2015 14:02
Full Stretched Banner Image
<!DOCTYPE HTML>
<head>
<style>
.banner
{
min-width:100%;
width:100%;
height:auto;
$(function() {
var slider, // Global slider value to force playing and pausing by direct access of the slider control
canSlide = true; // Global switch to monitor video state
// Load the YouTube API. For some reason it's required to load it like this
var tag = document.createElement('script');
tag.src = "//www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
<?php
$cdn_urls = @fopen('https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/css/bootstrap.min.css', r);
$cdn_urls = @fopen('https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/css/bootstrap-responsive.min.css', r);
if( $cdn_urls !== false)
{
//USE CDNS
@amitabhaghosh197
amitabhaghosh197 / index.php
Last active August 29, 2015 14:03
Convert the Youtube url to iframe src inside Reduxframework
<div class="featured-videos-section-content ">
<div class="span4 featured-videos-items">
<span id="myCode"><?php echo change_youtube() ?></span>
</div><!--------/.featured-videos-items 1---------------------->
@amitabhaghosh197
amitabhaghosh197 / CustomCssACEEditorforReduxFramework
Last active August 29, 2015 14:03
Add Custom CSS in Redux Framework
Now you can write a custom css for your pages or posts. Just write in the editor and call those classes/ ids in the posts/pages
@amitabhaghosh197
amitabhaghosh197 / ACE_Editor_for_Wordpress_without_theme_options_Readme
Last active August 29, 2015 14:03
ACE EDITOR FOR WORDPRESS [Without Theme Options]
1. This programme is developed from the tutorial: http://code.tutsplus.com/tutorials/adding-a-custom-css-editor-to-your-theme-using-ace--wp-29451
2. Make a folder "ace" and keep in your desired directory. Just include the ace-functions.php in your function.php.
3. The wp_header code in the tutorial is being corrected by me.
4. Three file required :
ace.js
mode-css.js
worker-css.js