This repository has been archived by the owner on Sep 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 865
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #618 from colin-marshall/sticky-post-fix
Changed WP sticky post class to .wp-sticky
- Loading branch information
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/** | ||
* Change the class for sticky posts to .wp-sticky to avoid conflicts with Foundation's Sticky plugin | ||
* | ||
* @package WordPress | ||
* @subpackage FoundationPress | ||
* @since FoundationPress 2.2.0 | ||
*/ | ||
|
||
if ( ! function_exists( 'foundationpress_sticky_posts' ) ) : | ||
function foundationpress_sticky_posts( $classes ) { | ||
$classes = array_diff($classes, array('sticky')); | ||
$classes[] = 'wp-sticky'; | ||
return $classes; | ||
} | ||
add_filter('post_class','foundationpress_sticky_posts'); | ||
|
||
endif; | ||
?> |