Custom Fields in bbPress Topic Form

Creating Fields
add_action ( ‘bbp_theme_before_topic_form_content’, ‘bbp_extra_fields’); function bbp_extra_fields() {

$value = get_post_meta( bbp_get_topic_id(), ‘bbp_extra_field1’, true); echo ‘<label for=”bbp_extra_field1″>Extra Field 1</label><br>’; echo “<input type=’text’ name=’bbp_extra_field1′

value='”.$value.”‘>”;  » Read more about: Custom Fields in bbPress Topic Form  »

Permanent 301 Redirect Setup in .htaccess

Redirect old domain to new domain
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.org/$1 [L,R=301,NC]
Force Redirect to NON-www version
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301,NC]
Force Redirect to WWW version
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]
Redirect from HTTPS to HTTP
RewriteEngine on
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Redirect from HTTP to HTTPS
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Redirect files with certain extension
RewriteEngine On
RewriteCond %{REQUEST_URI} .aspx$
RewriteRule ^(.*).php$ /$1.php [R=301,L]
Redirect Individual Files

Considering Two Situations

  1. Redirecting File within the same domain
  2. Redirect File to Another Domain

Redirect File within the Same Domain
Redirect 301 /file1.htm /file2.htm
Redirect File to Another Domain
Redirect 301 /file1.php http://example.org/file2.php  » Read more about: Permanent 301 Redirect Setup in .htaccess  »

WordPress Robots.txt Sample

WordPress Robots.txt
User-agent: *
Disallow: /wp-admin/
Disallow: /wp-includes/
Adding Sitemaps to WordPress Robots.txt
User-agent: *
Disallow: /wp-admin/
Disallow: /wp-includes/

Sitemap: http://www.example.com/post-sitemap.xml
Explanation
Allowing all Bots

  • Allowing any Bots to Crawl

User-agent: *
Disallow:
Not Allowing any Bots

  • Not Allowing any Bots to Crawl

User-agent: *
Disallow: /

Block a Folder
User-agent: *
Disallow: /Folder/
Block a File
User-agent: *
Disallow: /file.html
 Block a page and/or a directory named private
User-agent: *
Disallow: /private
Block All Sub Folders starting with private
User-agent: *
Disallow: /private*/
Block URL’s end with
User-agent: *
Disallow: /*.asp$
Block URL’s which includes Question Mark (?)
User-agent: *
Disallow: /*?*
Block a File Type
User-agent: *
Disallow: /*.jpeg$
Block all Paginated pages which don’t have “?”  » Read more about: WordPress Robots.txt Sample  »

Cross Domain Tracking [ Google Analytics ]

Cross Domain Tracking in Google Analytics is for tracking a Visitor across different domains

Usage

Tracking the same visitor navigating across

  1. Various Domain names
  2. Various Sub Domains
  3. http and https of the same/different domain
  4. 3rd Party Shopping Carts
  5. IFrame

Linking

( Example )

Consider two domains :

  1. example-1.com : Primary Domain
  2. example-2.com : Secondary Domain

Primary Domain
<script>  » Read more about: Cross Domain Tracking [ Google Analytics ]  »