Skip to content

Instantly share code, notes, and snippets.

View kalico1's full-sized avatar

kalico kalico1

  • Silicon Valley, CA
View GitHub Profile
@primozcigler
primozcigler / zendesk-api-script.js
Last active August 29, 2015 14:22
Using Zendesk API for article in multiple sections
// fix to display general questions in themes' sections
// using Zendesk API
// @link https://developer.zendesk.com/rest_api/docs/help_center/articles#list-articles
(function() {
if ( $( '.breadcrumbs a[href*="200506781"]' ).length ) { // 200506781 is ID of the section for general questions
var config = {
$articleList: $( 'ul.article-list' ),
tmpl: _.template( '<li><a href="<%= url %>"><%- title %></a></li>' ),
apiUrl: 'https://proteusthemes.zendesk.com/api/v2/help_center/sections/200132421/articles.json',
};
@MikeNGarrett
MikeNGarrett / redirect-wp-multisite-activation.php
Last active August 25, 2021 16:00
Redirect WordPress Multisite User Upon Activation
<?php
// add do_action('my_do_active_user_message_hook'); where you want the welcome message to display after redirect
add_action( 'activate_header', 'check_activation_key_redirect_to_page' );
/**
* Check the wp-activate key and redirect the user to the apply page
* based on http://www.vanbodevelops.com/tutorials/how-to-skip-the-activation-page-and-send-the-user-straight-to-the-home-page-for-wordpress-multisite
*/
function check_activation_key_redirect_to_page() {
// We check if the key is not empty
@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/