Skip to content

Instantly share code, notes, and snippets.

View thewebsitedev's full-sized avatar
🏠
Working

Gautam Thapar thewebsitedev

🏠
Working
View GitHub Profile
@thewebsitedev
thewebsitedev / woo-loop-image-wrap.php
Created July 31, 2019 11:59 — forked from krogsgard/woo-loop-image-wrap.php
WooCommerce insert wrapper around thumbnail images in loop
<?php
/* This snippet removes the action that inserts thumbnails to products in teh loop
* and re-adds the function customized with our wrapper in it.
* It applies to all archives with products.
*
* @original plugin: WooCommerce
* @author of snippet: Brian Krogsard
*/
remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10);
@thewebsitedev
thewebsitedev / git-ignore.sh
Created May 4, 2018 14:12 — forked from jeffjohnson9046/git-ignore.sh
Remove unwanted files from a git repo AFTER adding a .gitignore. The files will remain on disk.
## I just ran into this after initializing a Visual Studio project _before_ adding a .gitignore file (like an idiot).
## I felt real dumb commiting a bunch of files I didn't need to, so the commands below should do the trick. The first two commands
## came from the second answer on this post: http://stackoverflow.com/questions/7527982/applying-gitignore-to-committed-files
# See the unwanted files:
git ls-files -ci --exclude-standard
# Remove the unwanted files:
git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached
@thewebsitedev
thewebsitedev / admin-redirect.php
Created July 3, 2017 19:23 — forked from kharissulistiyo/admin-redirect.php
Admin Page Redirection After WordPress Theme Activated
/**
* WordPress snippet
* Admin page redirection
* Put this inside theme setup function
*/
global $pagenow;
if ( is_admin() && 'themes.php' == $pagenow && isset( $_GET['activated'] ) ) {
@thewebsitedev
thewebsitedev / infinite-previous-next-looping.php
Created April 29, 2017 18:13 — forked from banago/infinite-previous-next-looping.php
Infinite next and previous post looping in WordPress
<?php
/**
* Infinite next and previous post looping in WordPress
*/
if( get_adjacent_post(false, '', true) ) {
previous_post_link('%link', '&larr; Previous Post');
} else {
$first = new WP_Query('posts_per_page=1&order=DESC'); $first->the_post();
echo '<a href="' . get_permalink() . '">&larr; Previous Post</a>';
wp_reset_query();
@thewebsitedev
thewebsitedev / info.md
Created April 6, 2017 12:14 — forked from marteinn/info.md
Using the Fetch Api with Django Rest Framework

Using the Fetch Api with Django Rest Framework

Server

First, make sure you use the SessionAuthentication in Django. Put this in your settings.py

# Django rest framework
REST_FRAMEWORK = {
    'DEFAULT_AUTHENTICATION_CLASSES': [
 'rest_framework.authentication.SessionAuthentication'
@thewebsitedev
thewebsitedev / App.js
Last active February 9, 2017 12:08 — forked from taxigy/App.js
Refactoring of rows+columns
// Let's say that every new row is represented by an object with just two
// properties, "className" and "columns", with default values:
const EMPTY_ROW = {
columns: [{
className: 'col-md-12',
text: 'This is some text',
children: [
{
type: 'Txt',
content: 'This is a content'
@thewebsitedev
thewebsitedev / offshore-vc-our-company
Created October 4, 2016 14:14
Offshore Visual Composer Our Company Page Template
[vc_row][vc_column][offshore_label]THE COMPANY[/offshore_label][vc_column_text]
<h4 class="subtitle" style="font-family: Roboto;">Uniquely transform premier infrastructures before functional metrics. Completely mesh sustainable leadership for economically sound sources.</h4>
Distinctively fashion standardized communities vis-a-vis seamless applications. Authoritatively recaptiualize efficient supply chains without vertical initiatives. Progressively visualize strategic relationships with error-free processes. Credibly strategize fully tested outsourcing with functional e-markets. Dynamically evisculate user friendly architectures before cross-media experiences. Interactively disintermediate empowered data whereas distinctive human capital. Compellingly utilize.
Dynamically utilize intermandated materials through customized process improvements. Conveniently recaptiualize adaptive leadership before long-term high-impact functionalities. Completely incubate customer directed meta-services after economically so
@thewebsitedev
thewebsitedev / offshore-vc-shortcodes
Created October 4, 2016 14:12
Offshore Visual Composer Shortcodes Page Template
[offshore_row ]
[offshore_column size="6" hide_on_mobile="no" border_left="no"][offshore_tab ]
[offshore_tab_panel title="Tab Number One" open="yes"]Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.
Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.[/offshore_tab_panel]
[offshore_tab_pa
@thewebsitedev
thewebsitedev / offshore-vc-our-mission
Created October 4, 2016 14:11
Offshore Visual Composer Our Mission Page Template
[vc_row][vc_column][offshore_label]MISSION AND VISION[/offshore_label][vc_column_text]
<h4 class="subtitle">Uniquely transform premier infrastructures before functional metrics. Completely mesh sustainable leadership for economically sound sources.</h4>
Distinctively fashion standardized communities vis-a-vis seamless applications. Authoritatively recaptiualize efficient supply chains without vertical initiatives. Progressively visualize strategic relationships with error-free processes. Credibly strategize fully tested outsourcing with functional e-markets. Dynamically evisculate user friendly architectures before cross-media experiences. Interactively disintermediate empowered data whereas distinctive human capital. Compellingly utilize.
Dynamically utilize intermandated materials through customized process improvements. Conveniently recaptiualize adaptive leadership before long-term high-impact functionalities. Completely incubate customer directed meta-services after economically sound imperatives. Disti
@thewebsitedev
thewebsitedev / offshore-vc-our-approach
Created October 4, 2016 14:10
Offshore Visual Composer Our Approach Page Template
[vc_row][vc_column width="1/2"][vc_column_text]<a href="http://demo.thewebsitedev.com/offshore-vc/wp-content/uploads/sites/8/2016/06/news1.jpg"><img class="size-full wp-image-138" src="http://demo.thewebsitedev.com/offshore-vc/wp-content/uploads/sites/8/2016/06/news1.jpg" alt="Some alt text" width="360" height="292" /></a>[/vc_column_text][/vc_column][vc_column width="1/2"][vc_column_text]
<h4 class="subtitle" style="font-family: Roboto; font-size: 28px;">OUR APPROACH</h4>
Interactively fashion functional action items after 24/365 results. Dynamically redefine world-class metrics without leading-edge markets. Progressively orchestrate enabled outside the box thinking via scalable.[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column width="1/2"][vc_column_text]
<h4 class="subtitle" style="font-family: Roboto; font-size: 28px;">EMPLOYEE BENEFIT</h4>
Interactively fashion functional action items after 24/365 results. Dynamically redefine world-class metrics without leading-edge markets. Progressively orchest