I have customized the related posts module and removed the related posts menu item from the switcher. The only problem is that the posts of the ‘more from author’ are not being loaded and I have to press the ‘more from author’ switch manually to load the posts.
My problem is that I couldn’t find the file where the constructor of the loaded posts are defined. I don’t need your help, writing code but I only want to know where I can find the piece of code…
Hi,
You can find the filter code here: http://screencast.com/t/u7qzUKxPfia8
Here is the related posts block: http://screencast.com/t/sKzqfmuG9LRa
Hope this helps!
Thanks
Hi Lucian,
Thanks for your help, but I got a problem:
I tried to display related-posts and more-from-author seperately by adding code beneath to /includes/shortcodes/td_related_posts.php. The problem is that I cannot find a way to load more-from-author posts by default when only the more-from-author switch is being displayed. Displaying related-posts works fine, because the posts are already loaded by default.
Where can I find the default constructor of the posts that are displayed?
//get the filter for this block
$buffy .= '<h4 class="td-related-title">';
$post_cat = get_the_category();
if (strtolower(get_the_author_meta('display_name', $this->post->post_author)) == 'redactie') {
$buffy .= '<a>block_uid . '" href="#">' . __td('RELATED ARTICLES') . '</a>';
}
elseif (strtolower($post_cat[0]->cat_name) == 'expert blogs') {
$buffy .= '<a>block_uid . '" href="#">' . __td('MORE FROM AUTHOR') . '</a>';
}
else {
$buffy .= '<a>block_uid . '" href="#">' . __td('RELATED ARTICLES') . '</a>';
$buffy .= '<a>block_uid . '" href="#">' . __td('MORE FROM AUTHOR') . '</a>';
}
$buffy .= '</h4>';
Before pressing ‘MORE FROM AUTHOR’ title (still showing wrong ‘RELATED ARTICLES’posts):

After pressing ‘MORE FROM AUTHOR’ title (showing correct posts):

How can I load the posts like in the 2nd image is displayed by default when only the ‘MORE FROM AUTHOR’ module is displayed?
Please help me, I am trying for so long now….
Hi,
sorry for the delay, that part of the block system is a bit more complicated but here is the modification:
- edit this file http://screencast.com/t/ZlLPnZAk
$td_block_args = array (
'limit' => $td_related_limit,
'ajax_pagination' => 'next_prev',
'live_filter' => 'cur_post_same_author',
'td_ajax_filter_type' => 'td_custom_related',
'class' => $td_related_class
);
- hide the title or modify it form includes/shortcodes/td_related_posts.php