Redirect User after login - Drupal 8

  • Posted on: 2 April 2016
  • By: ychaugule

When building sites, many client wants users to get redirected to particular page (like Site Home Page) or page based on User Roles. Today we'll see how we can redirect user after login to particular page.

NOTE: I've defined my own custom page using [MODULENAME].routing.yml named as "custom.redirect_callback", which we'll be using for redirecting user.

How to enable Gzip compression using htaccess

  • Posted on: 29 October 2015
  • By: ychaugule

Gzip compression allows reducing file size when transferring from server to user browser. We can enable Gzip compression by writing few lines of code in .htaccess file.

For enabling Gzip compression, we need Apache's mod_deflate module enabled. If it is not already enabled, you can enable using the steps provided here.

Alter $WP_Query in WordPress

  • Posted on: 20 January 2015
  • By: ychaugule

When showing list of content (i.e. Posts, Custom Post Type) on Category Page, the main $WP_Query renders posts of default Posts type. To show content from different post type we've to alter the main $WP_Query.

There are few different ways using which we can alter the $WP_Query. But here is one of the way to alter $WP_Query without removing existing conditions in Query.

Pages