Skip to content

Instantly share code, notes, and snippets.

View humayunahmed8's full-sized avatar
🤡
code fool

Humayun Ahmed humayunahmed8

🤡
code fool
View GitHub Profile
@rveitch
rveitch / sass-7-1-pattern.scss
Last active April 23, 2024 08:10
Sass 7-1 Pattern
sass/
|
|– base/
| |– _reset.scss # Reset/normalize
| |– _typography.scss # Typography rules
| ... # Etc…
|
|– components/
| |– _buttons.scss # Buttons
| |– _carousel.scss # Carousel
@maxxscho
maxxscho / plugin-class-demo.php
Last active October 18, 2023 14:28 — forked from thefuxia/plugin-class-demo.php
Plugin Class Demo
<?php # -*- coding: utf-8 -*-
/**
* Plugin Name: Plugin Class Demo
* Description: How I am using the base class in plugins.
* Plugin URI:
* Version: 2012.09.29
* Author: Thomas Scholz
* Author URI: http://toscho.de
* License: GPL
* Text Domain: plugin_unique_name
@jonschr
jonschr / gist:6bc52166db037e880772
Last active April 5, 2023 05:09
Conditional logic with select2 (addon for the Beautiful taxonomy filters plugin)
jQuery(document).ready(function($) {
/**
* If the value is preselected (runs when the the doc is ready)
*/
// get the starting value of the field; empty means no selection is made and conditional fields should hide by default
var startingval = $('select#select-job-industry').val();
if ( startingval == '' ) {
@maxxscho
maxxscho / extras.php
Created February 7, 2015 09:30
Wordpress Redirect Post Type archive
<?php
if ( ! function_exists( 'redirect_post_type_archive' ) ) {
/**
* Redirect to 404 if we are querying an post_type archive, we won't
* @author Markus Schober
*/
function redirect_post_type_archive() {
global $wp_query, $post;
if (is_post_type_archive(array('post-type'))) {
@EmranAhmed
EmranAhmed / style.css
Last active March 21, 2024 13:34 — forked from luetkemj/style.css
WordPress Default Style.css file styling
/* =============================================================================
WordPress WYSIWYG Editor Styles
========================================================================== */
.entry-content img {
margin: 0 0 1.5em 0;
max-width: 100%;
height: auto;
}
.alignleft, img.alignleft {
@maxxscho
maxxscho / style.css
Created April 19, 2012 07:34
Wordpress Default CSS Styles
/* !-------- WORDPRESS CLASSES ------------------- */
/*------------------------------------------------------------ *\
\*------------------------------------------------------------ */
/* !-- WP WYSIWYG Editor Styles -- */
.entry-content img {
margin: 0 0 1.5em 0;
}
.alignleft, img.alignleft {
margin-right: 1.5em;