This file contains hidden or 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
<!-- You can add multiple Adsense Ad units --> | |
<!-- Replace ca-pub-1234567890 and ad-slots AAA, BBB, CCC, DDD, EEE, FFF --> | |
<div id="google-ads-1"> | |
<script type="text/javascript"> | |
adUnit = document.getElementById("google-ads-1"); | |
adWidth = adUnit.offsetWidth; | |
/* Replace this with your AdSense Publisher ID */ |
This file contains hidden or 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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^old-domain.com$ [OR] | |
RewriteCond %{HTTP_HOST} ^www.old-domain.com$ | |
RewriteRule (.*)$ http://www.new-domain.com/$1 [R=301,L] | |
</IfModule> |
This file contains hidden or 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
<style> | |
.adsense-ad-unit-1 { width: 320px; height: 50px; } | |
@media(min-width: 500px) { .adsense-ad-unit-1 { width: 468px; height: 60px; } } | |
@media(min-width: 800px) { .adsense-ad-unit-1 { width: 728px; height: 90px; } } | |
</style> | |
<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> | |
<!-- Adsense Ad Unit 1 --> | |
<ins class="adsense-ad-unit-1" |
This file contains hidden or 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
<html> | |
<head> | |
.... | |
YOUR ADSENSE CSS CODE HERE | |
</head> | |
<body> | |
<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> | |
.... | |
<!-- Adsense Ad Unit 1 --> |
This file contains hidden or 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 type="text/javascript">jQuery(document).ready(function ($) { | |
$('table').css({ | |
'border-collapse':'collapse' | |
}); | |
$('tr th').css({'background':'#666666', 'color':'#ffffff', 'font-family':'verdana', 'font-weight':'normal'}); | |
// Here using jquery selectors | |
$('tr:even').css({'background':'#f5f5f5'}); |
This file contains hidden or 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
/** Force full width layout on bbPress forums */ | |
add_filter( 'genesis_pre_get_option_site_layout', 'child_do_layout' ); | |
function child_do_layout( $opt ) { | |
if ( is_bbpress() ) { | |
$opt = 'full-width-content'; // Change this to any Genesis layout | |
return $opt; | |
} | |
} |
This file contains hidden or 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
// Reverse forum replies order from newer to older | |
function custom_bbp_has_replies() { | |
$args['order'] = 'DESC'; // ‘ASC’ (Ascending, Default), 'DESC' (Descending) | |
return $args; | |
} | |
add_filter('bbp_before_has_replies_parse_args', 'custom_bbp_has_replies' ); |
This file contains hidden or 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
function pj_hla_logged_in_topics($have_posts){ | |
if (!is_user_logged_in()){ | |
$have_posts = null; | |
echo 'Login to see replies'; | |
} | |
return $have_posts; | |
} | |
add_filter('bbp_has_topics', 'pj_hla_logged_in_topics'); | |
add_filter('bbp_has_forums', 'pj_hla_logged_in_topics'); |