How to handle publication date and author content

By default, the line of meta (name of the author and publication date) are displayed through a list of arguments:

$metaArgs = array(
    'author' => true,
    'date' => true,
    'date_format' => get_option( 'date_format' ),
    'time_format' => get_option( 'time_format' )
);
You can change these arguments through feedzy_meta_args hook and only display the author’s name or date, select the date and time format.
function tifd_feedzy_meta_args($metaArgs, $feedURL){
    if( 'http://b-website.com/feed' == $feedURL ) {
        $metaArgs = array(
                    'author' => false,
                    'date' => true,
                    'date_format' => 'j F Y',
                    'time_format' => 'G \h i'
                );
    }
    return $metaArgs;
}
add_filter('feedzy_meta_args', 'tifd_feedzy_meta_args', 9, 2);
Or simpler if you want to change a single parameter. Here the author’s name is hidden for all feeds.
function tifd_feedzy_meta_hide_author($metaArgs, $feedURL){
    $metaArgs['author'] = false;
    return $metaArgs;
}
add_filter('feedzy_meta_args', 'tifd_feedzy_meta_hide_author', 9, 2);
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us