I am currently working on a news aggregator website.I’m utilizing the archive to display all my posts in a feed. In addition to including the category and date of the post I also need to have the source listed. I have tried using advanced custom fields and adding code to the archive loop, but have not had much success. What can I do to add new metadata to the archive page? Here is a link to the site: https://skunkbits.com
I need the source to be inline with the date and category.
-
This topic was modified 5 years by
marquezchristina98.
-
This topic was modified 5 years by
marquezchristina98.
-
This topic was modified 5 years by
marquezchristina98.
Hello,
I saw that you are using flex block 5, and to add that extra parameter you have to edit this file from this path => wp-content/plugins/td-composer/legacy/Newspaper/includes/modules/td_module_flex_5.php => https://www.screencast.com/t/g2Y4ODAemAt
Thank you!
Hi,
Where should I be adding my custom code? If I’m understanding correctly, this is the piece I need to add: <$meta = get_post_meta($post->ID,’user_submit_url’,true);
echo ‘‘.$meta.’‘;>
I am not sure where I should be placing this code.Here is the code that is currently in module flex 5: </// meta info html
$meta_info = ”;
if (($category_position == ” && $hide_cat != ‘hide’) || $hide_author_date != ‘hide’) {
$meta_info .= ‘<div class=”td-editor-date”>’;
if ($category_position == ” && $hide_cat != ‘hide’) { $meta_info .= $this->get_category(); }
if( $hide_author_date != ‘hide’ ) {
$meta_info .= ‘<span class=”td-author-date”>’;
if ($author_photo != ”) {
$meta_info .= $this->get_author_photo();
}
if( $hide_author != ‘hide’ ) {
$meta_info .= $this->get_author(true);
}
if( $hide_date != ‘hide’ ) {
$meta_info .= $this->get_date($modified_date, true, $time_ago, $time_ago_add_txt);
}
if( $hide_rev != ‘hide’ ) {
$meta_info .= $this->get_review();
}
if( $hide_com != ‘hide’ ) {
$meta_info .= $this->get_comments();
}
$meta_info .= ‘</span>’;
}
$meta_info .= ‘</div>’;
}>
Hello,
If you want to set it for flex block 5, here is the block path wp-content/plugins/td-composer/legacy/Newspaper/includes/shortcodes/td_flex_block_5.php and use module 5 in the path above, sorry, but I don’t know exactly where that code should be added because I’m not a developer.
Thank you for your understanding!