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
<?php | |
// don't add above | |
/** | |
* | |
* Add Genesis SEO and Archive Settings to faq and testimonial post types added via plugin | |
* | |
*/ |
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
<!-- | |
Remove the FB like box script from your header and modify the following for your use. | |
Then place it in your html (like a widget area) where you want it to appear. | |
--> | |
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
<?php | |
//don't add | |
// posts per page for CPT 'your-cpt' | |
function yourprefix_posts_per_page_in_portfolio_cpt( $query ) { | |
if ( ! is_admin() && is_post_type_archive( 'your-cpt' ) ) { | |
$query->set( 'posts_per_page', 2 ); |
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
<?php | |
// DO NOT ADD ABOVE | |
/* Instructions only: put this at the very bottom of your functions.php file. | |
* outside of all other functions, registrations, etc. | |
* so go to the very very bottom with your code editor and hit return a couple times to get some white space and then | |
* paste code below in and change the two instances of yourprefix_ (that's an underscore) to yourname or initials | |
*/ | |
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
<?php | |
//don't add | |
/* | |
* Add Genesis one-third (3 col) class to the article.post in archives | |
* in the main query. Uses Genesis specific filter | |
* instead of WordPress's post_class filter | |
* to do the same thing 'cause why not! | |
* | |
*/ |
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
/* put date before title in featured post widget */ | |
.featuredpost .entry-title { | |
display: table-footer-group; | |
position: relative; | |
top: -5px; /* adjust as needed */ | |
} | |
.featuredpost .entry-meta { |
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
<?php | |
//don't add | |
/** | |
* | |
* Create Metabox and Primary Category Select Field | |
* Requires CMB2 TRUNK branch NOT the plugin from the repo | |
* Install CMB2-trunk.zip via plugin interface or incorporate in your theme, read their docs | |
* https://github.com/WebDevStudios/CMB2/branches | |
* |
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
<?php | |
//don't add | |
/** | |
* | |
* Exclude Terms by ID from the get_the_category_list(); (WordPress core) | |
* Ref: http://stackoverflow.com/a/34817401/1004312 | |
* I add a post to two categories with the ids (examples) 200 and 266 | |
* but I only want 200 in the post_meta shortcode in Genesis | |
* which uses the get_the_category_list(); (WordPress core) which has no filter |
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
<?php | |
//don't add this above | |
//change the hook and the function name | |
function yourprefix_woocommerce_function_does_what() { | |
if ( ! class_exists( 'WooCommerce' ) ) return; | |
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
<?php | |
//do not add above php tag | |
/** | |
* | |
* add comment form above the discussion (list of comments) | |
* change yourprefix_ to yours | |
*/ | |
function yourprefix_reorder_comment_form_before_discussion() { |