Filter Reference / iworks upprev box item

Description

iworks_upprev_box_item is a filter applied to string witch is displayed as box item.

Usage

function add_to_my_item($content) {
    return $content . 'add some string';
}
add_filter('iworks_upprev_box_item', 'add_to_my_item');

Add add some string to display of box item.

Parameters

$content
(string) (required) upPrev box item.

Default: depend of settings

Examples

For posts in category “Hot News”, add one line advertising.

add_filter(
    'iworks_upprev_box_item',
    'category_hot_news_add_advertising',
);
function category_hot_news_add_advertising($content) {
    if( is_post() && in_category('Hot News') ) {
        $content .= '<hr><a href="//link">See other hot stuff...</a>';
 
    }
    return $content;
}

Change Log

Leave a Reply

Your email address will not be published. Required fields are marked *