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'
<?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); |
## 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 |
/** | |
* WordPress snippet | |
* Admin page redirection | |
* Put this inside theme setup function | |
*/ | |
global $pagenow; | |
if ( is_admin() && 'themes.php' == $pagenow && isset( $_GET['activated'] ) ) { |
<?php | |
/** | |
* Infinite next and previous post looping in WordPress | |
*/ | |
if( get_adjacent_post(false, '', true) ) { | |
previous_post_link('%link', '← Previous Post'); | |
} else { | |
$first = new WP_Query('posts_per_page=1&order=DESC'); $first->the_post(); | |
echo '<a href="' . get_permalink() . '">← Previous Post</a>'; | |
wp_reset_query(); |
// 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' |
[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 |
[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 |
[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 |
[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 |