This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Add this function to the functions.php in your theme folder */ | |
/* to exclude certain posts from url canonicalization of SEO by Yoast plugin */ | |
function wpseo_canonical_exclude( $canonical ) { | |
global $post; | |
if ( get_post_type( get_the_ID() ) == "name_your_post_type") { | |
//if ( $post->ID == 7777) { | |
$canonical = false; | |
} | |
return $canonical; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Block visits from semalt.com domains and subdomains by @Xyborg | |
RewriteEngine on | |
RewriteCond %{HTTP_REFERER} ^http://([^.]+\.)*semalt\.com [NC] | |
RewriteRule (.*) http://www.semalt.com/?utm_source=Google&utm_medium=organic&utm_term=go_away [R=301,L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am Xyborg on github. | |
* I am xyborg (https://keybase.io/xyborg) on keybase. | |
* I have a public key whose fingerprint is D184 49B6 F64A D3A3 EB26 8DEE EDE5 E5F2 3481 0314 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Put the following lines before the default WP code: | |
RewriteEngine On | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
It should look like this: | |
RewriteEngine On | |
RewriteCond %{HTTPS} !=on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* The following WordPress function will look for links INSIDE the post contents */ | |
/* and add the target="_blank" to each one so they will open in a new tab */ | |
function xbg_links_in_new_tab($content){ | |
$pattern = '/<a(.*?)?href=[\'"]?[\'"]?(.*?)?>/i'; | |
$content = preg_replace_callback($pattern, function($m){ | |
$tpl = array_shift($m); | |
$hrf = isset($m[1]) ? $m[1] : null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Files "^(*.php|*.phps)"> | |
order deny,allow | |
deny from all | |
</Files> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Facebook Pixel Code --> | |
<script> | |
!function(f,b,e,v,n,t,s) | |
{if(f.fbq)return;n=f.fbq=function(){n.callMethod? | |
n.callMethod.apply(n,arguments):n.queue.push(arguments)}; | |
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; | |
n.queue=[];t=b.createElement(e);t.async=!0; | |
t.src=v;s=b.getElementsByTagName(e)[0]; | |
s.parentNode.insertBefore(t,s)}(window, document,'script', | |
'https://connect.facebook.net/en_US/fbevents.js'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
fbq('track', 'CompleteRegistration'); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys, os, time | |
import tweepy | |
keys = dict( | |
consumer_key='_YOUR_CONSUMER_KEY', | |
consumer_secret='_YOUR_SECRET_KEY', | |
access_token='_YOUR_ACCESS_TOKEN', | |
access_token_secret='_YOUR_ACCESS_TOKEN_SECRET' | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
"""Uso de Google Search Analytics API (part of Search Console API). | |
Mas info en: https://developers.google.com/webmaster-tools/ | |
To use: | |
1) Install the Google Python client library, as shown at https://developers.google.com/webmaster-tools/v3/libraries. | |
2) Sign up for a new project in the Google APIs console at https://code.google.com/apis/console. | |
3) Register the project to use OAuth2.0 for installed applications. | |
4) Copy your client ID, client secret, and redirect URL into the client_secrets.json file included in this package. |
OlderNewer