Facebook Pixel Feature Card Style News Feeds | Western Kentucky University

Feature Card Style


Feature Cards style feeds display in a custom card like to the WKU Homepage or the Style-4 card snippet. This card displays the article image with a title and date. When hovering over the card the description area expands and the image takes a WKU red fade effect. If you do not have an article image a default one of big red is provided. Style 7 displays these cards in a row, best used for one column templates. Style 8 displays these cards in a grid style, this is not compatible with side columns.


 

Style 7 Featured Card Style (Row)

You may have to adjust the number of items displayed to get the best appearance based upon how many columns you have enabled. Display 2 articles if left and right enabled. 3 articles for one side column. 3 or 4 articles for single column layouts.


<?php

// id of the news addon, required
$config['newsid'] = '45';

// number of articles to be shown in the feed, required
$config['articles'] = '3';

// style to use when formatting the feed on the page, required
$config['style'] = '1';

// load the functions we need and show the feed based on above settings
include_once ('/var/www/html/_resources/php/news_v2/functions.php');
echo news_display_feed($config);

?>

 


 

Style 8 Featured Card Style (Grid)

When selecting number of articles to display, try to use an even number to keep the grid full.


<?php

// id of the news addon, required
$config['newsid'] = '45';

// number of articles to be shown in the feed, required
$config['articles'] = '3';

// style to use when formatting the feed on the page, required
$config['style'] = '8';

// load the functions we need and show the feed based on above settings
include_once ('/var/www/html/_resources/php/news_v2/functions.php');
echo news_display_feed($config);

?>



Need Assistance?

The WKU ITS Service Desk is here to help. Give us a call, chat with a representative online, use the Self-Help Knowledge Base and more.

Get Help


Some of the links on this page may require additional software to view.

 Last Modified 10/31/24