2021-04-27 22:21:26 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Change the class for sticky posts to .wp-sticky to avoid conflicts with Foundation's Sticky plugin
|
|
|
|
*
|
2021-04-28 01:20:47 +02:00
|
|
|
* @package arcHIVE-theme
|
2021-04-27 22:21:26 +02:00
|
|
|
* @since FoundationPress 2.2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
if ( ! function_exists( 'foundationpress_sticky_posts' ) ) :
|
|
|
|
function foundationpress_sticky_posts( $classes ) {
|
|
|
|
if ( in_array( 'sticky', $classes, true ) ) {
|
|
|
|
$classes = array_diff( $classes, array( 'sticky' ) );
|
|
|
|
$classes[] = 'wp-sticky';
|
|
|
|
}
|
|
|
|
return $classes;
|
|
|
|
}
|
|
|
|
add_filter( 'post_class', 'foundationpress_sticky_posts' );
|
|
|
|
|
|
|
|
endif;
|