Skip to content

Instantly share code, notes, and snippets.

View sharazghouri's full-sized avatar
🎯
Focusing

Sharaz Shahid sharazghouri

🎯
Focusing
View GitHub Profile
<?php
$args = array(
'label' => '', // Text in Label
'class' => '',
'style' => '',
'wrapper_class' => '',
'value' => '', // if empty, retrieved from post meta where id is the meta_key
'id' => '', // required
'name' => '', //name will set from id if empty
@sharazghouri
sharazghouri / gist:19ac267a82805bcc58f357faeb376068
Created August 29, 2020 10:54 — forked from mikejolley/gist:2176823
WooCommerce - Show products from current product category (when viewing a single product)
<?php
if ( is_singular('product') ) {
global $post;
// get categories
$terms = wp_get_post_terms( $post->ID, 'product_cat' );
foreach ( $terms as $term ) $cats_array[] = $term->term_id;
.gform_wrapper {
form .gform_body .ginput_complex input[type=text] {
width:100% !important;
}
input, input[type=text], select, textarea {
width:100% !important;
@include box-sizing(border-box);
}
}
@sharazghouri
sharazghouri / media-query.css
Created October 23, 2018 12:15 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@sharazghouri
sharazghouri / 0-links.md
Created February 18, 2018 14:44 — forked from Shelob9/0-links.md
Install create-guten-block and use it to create a plugin with a block (and optionally eject from cgb-scripts)
@sharazghouri
sharazghouri / README.md
Created January 16, 2018 06:05 — forked from jxson/README.md
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

@sharazghouri
sharazghouri / social_counts.inc.php
Created November 16, 2017 07:15 — forked from andrewspear/social_counts.inc.php
Count your Facebook followers, Twitter followers, Google+ followers, LinkedIn group followers, Constant Contact subscribers, YouTube subscribers, YouTube channel views.
<?
/*
$facebook_followers = social_count('facebook', array(
'id' => '<your_facebook_page_name_or_id>',
'api_key' => '<your_facebook_app_api_key>',
'api_secret' => '<your_facebook_app_api_secret>'
));