If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
I want to take the “About The Author” part from pages to sidebars on main page. So I want delet it on pages and just place to sidebars on main page. How can I do that?
Afaik this is not easily possible because the sidebar/widget code is outside the post/page content loop and query. Depending on your php skills you can try to implement this feature though. I’d store the entry id into a global variable which can be used in sidebar.php to get the author information. But you’d also need to find a way to handle pages with many entries (like archives, etc.) – eg conditional tags: http://codex.wordpress.org/Conditional_Tags can be used for this task. I hope this helps you or your developers a bit.
Can’t we delete the “About The Author” part landing at the end of the pages? Is it so difficult? I want to delete it from there and add to the right sidebar as an widget or as an info with my picture. Thats all. I think it mustn’t be so difficult?
Removing the author box is no problem at all – open up single.php and delete following code:
<div class='entry' id="author-box">
$author_email = get_the_author_email();
echo get_avatar( $author_email, $size = '60');
<h3><?php _e('About the author','newscast'); ?></h3>
$description = get_the_author_description();
if($description != '')
_e('The author didnt add any Information to his profile yet','newscast');
Thanks for that. So if we add these codes to the sidebar.php, can’t we see it on sidebar? Isn’t there an easy way to add author info & picture to sidebar?
No the code won’t work in the sidebar (or tbh it works in some special cases but it would be very buggy and thus useless) because (as I explained above) it requires the post loop and the data is not available in sidebar.php. You can search for a widget here: http://wordpress.org/extend/plugins/search.php?q=author+widget but I’m not sure if they’ll work.
The topic ‘How to take (transfer) the "About the Author" part to main page (sidebar)’ is closed to new replies.