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 custom_body_class($classes) { | |
if (!is_user_logged_in()) | |
$classes[] = 'not-loggedin'; | |
return $classes; | |
} | |
add_filter('body_class','custom_body_class'); |
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 | |
add_filter( 'body_class' , 'ft_add_guest_body_class' ); | |
/** | |
* Adds a body class for guests. | |
* | |
* @author Remkus de Vries | |
* @link http://remkusdevries.com/when-sharing-wordpress-related-code-snippets-i-can-haz-standards-please/ | |
* @param array $classes Existing body classes | |
* @return array Amended body classes |
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 | |
/** | |
* Custom Post Type with matching Custom Taxonomy. Only thing missing is how to | |
* get the following permalink: /tips/taxonomy-name/postname | |
* | |
*/ | |
register_post_type( 'Tips', array( | |
'label' => 'Tips', |
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 | |
add_filter( 'the_content_rss', 'iculture_add_custom_fields_to_apptopvijf_content' ); | |
add_filter( 'the_content', 'iculture_add_custom_fields_to_apptopvijf_content' ); | |
/** | |
* Alter the content output for the apptovijf custom post type. | |
* | |
* @global $post Post object | |
* @param string $content Existing content. | |
* @return string Filtered content. |
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 | |
add_action( 'genesis_after_post','ecowijs_add_widget_area_between_grid' ); | |
/** | |
* The ecowijs_add_widget_area_between_grid function is all about | |
* dAdding Widget Area between Genesis Featured and Genesis Gri | |
* | |
* @access public | |
* @return void | |
*/ |
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
// Make two admin-only fields (as text fields) | |
// and post to the custom fields from Gravity Forms | |
// instead of the "real" date picker. | |
// NOTE: change the input IDs to match the ones on your form | |
function rkv_datesubmit_fix ($form){ | |
//event start date field id is 3 | |
//event end date field ID is 4 | |
$raw_srt = $_POST['input_3']; | |
$raw_end = $_POST['input_4']; |
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 | |
$args = array( | |
'post_type' => 'post', | |
'post_status' => 'publish', | |
'order' => 'DESC', | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'post_format', | |
'field' => 'slug', |
OlderNewer