Skip to content

Instantly share code, notes, and snippets.

@danielpataki
danielpataki / link.css
Last active May 15, 2017 09:55
Microinteractions
@vishalbasnet23
vishalbasnet23 / Readme.txt
Created December 15, 2014 11:20
Custom Activation Link on Sign Up WordPress
Step by step guide.
First Phase:
1.First create a html form with first name, last name and email field for signing up process.( Remember the action of the form it has to be the page slug of email confirmation page that you will be creating at in next phase. )
Second Phase :
1.Create a Page ( Remember the slug has to be the same of that of action of the form of phase one ) and assign the template template-confirmation-mail.php
2.This page is responsible for generating unqiue hash key and sending that hash key along with the user's new account credentials to their email.
3.Remember the link of the activation_link has to the link to the email-verification template, which we will be creating in next phase.
Third Phase :
1. Create a page and assign it to Email Verification Template.( Remember this template has to be assigned to the page that you sent in the mail in previous step )
2. This page is responsilble matching that unqiue key sent on the email once new user visit that page.
@willybahuaud
willybahuaud / translate-taxonomy-slug.php
Last active February 13, 2020 18:38
Translate Taxonomy base slug wpml
<?php
add_action( 'init', 'register_my_taxo' );
function register_my_taxo() {
register_taxonomy( 'immo_cat', 'immobilier', array(
'hierarchical' => false,
'label' => 'Type de biens',
// je déclare le slug de taxo de manière à pouvoir le traduire
'rewrite' => array( 'slug' => icl_t('nebula', 'property-type-slug', 'type-bien-immobilier' ) ),
) );
}
@kasparsd
kasparsd / custom-post-taxonomy-permalinks.php
Created June 13, 2012 15:47
Create permalink structure URLs for custom post types that include all parent terms from a custom taxonomy
<?php
/*
Term Archive Pages:
- http://example.com/recipes/dinner/
- http://example.com/recipes/breakfast,brunch/
Single Recipe Pages:
- http://example.com/recipes/dinner/soup-title/
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/