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
<?php | |
//* Do NOT include the opening php tag | |
//* Remove posted comments from Genesis | |
remove_action( 'genesis_comments', 'genesis_do_comments' ); |
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
/** Move Genesis Comments */ | |
add_action( 'genesis_before_comments' , 'eo_move_comments' ); | |
function eo_move_comments () | |
{ | |
if ( is_single() && have_comments() ) | |
{ | |
remove_action( 'genesis_comment_form', 'genesis_do_comment_form' ); | |
add_action( 'genesis_comments', 'genesis_do_comment_form', 5 ); | |
} | |
} |
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 type="text/javascript"> | |
var comments = document.getElementsByClassName('comments')[0], | |
disqusLoaded=false; | |
function loadDisqus() { | |
var disqus_shortname = 'netrival'; | |
var dsq = document.createElement('script'); | |
dsq.type = 'text/javascript'; | |
dsq.async = true; | |
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.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
<?php | |
function my_custom_get_dynamic_roles( $bbp_roles ) | |
{ | |
/* Add a role called Community Contributor */ | |
$bbp_roles['bbp_basic_member'] = array( | |
'name' => 'Basic Member', | |
'capabilities' => my_custom_get_caps_for_role( 'bbp_basic_member' ) | |
); | |
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
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'); |
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
/** 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 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 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 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 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> |