Authors Page in v. 6.1

Posted in: Newspaper
Post count: 16

I have tried to make an authors page using the authors block, been looking at this post for the solution -> https://forum.tagdiv.com/topic/author-box-help/

It works fine when i insert this in the main themes td_block_author.php


$buffy .= '<div class="td-authors-description desc">';
$buffy .= '<p>' . get_the_author_meta( "description", $td_author->ID ) . '</p>';
$buffy .= '</div>';

But im trying to make it work from my child theme instead. I have added this to my child functions.php


function hook_td_global_after() {
td_api_block::update('td_block_authors',
array(
'map_in_visual_composer' => true,
"name" => 'Block Authors',
"base" => 'td_block_authors',
"class" => 'td_block_authors',
"controls" => "full",
"category" => 'Blocks',
'icon' => 'icon-pagebuilder-td_block_authors',
'file' => td_global::$get_template_directory . '/includes/shortcodes/td_block_authors.php',
"params" => array_merge(
td_wp_booster_config::get_map_block_general_array(),
td_wp_booster_config::get_map_filter_array(),
td_wp_booster_config::get_map_block_ajax_filter_array(),
td_wp_booster_config::get_map_block_pagination_array()
)
)
);
}

But it doesn’t work. Its probably me whos to tired to figure it out, but i dont get it. :/

Post count: 16

Nevermind. I finally got the coding right. Must go to bed..!

For those interested:
add_action('td_global_after', 'hook_td_global_after'); // hook used to add or modify items via Api
function hook_td_global_after() {
td_api_block::update_key('td_block_authors', 'file', get_stylesheet_directory() . '/includes/shortcodes/td_block_authors.php');
}

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.