If you have an outdated version of WordPress on your site because you can't update deTube theme, then I will show you how to fix it.
There are two fixes to be done, one for the section boxes on the home page and another one for the sidebar.
To fix home page boxes you have to edit the file wordpress/wp-content/themes/detube/functions.php and add the line $args[‘title’] = ”; below the line $args['posts_per_page'] = $posts_per_page;
/**
* Output a Section Box
*
* @since deTube 1.0
*/
function dp_section_box($args = array()) {
$defaults = array(
'post_type' => 'post',
'cat' => '',
'taxonomies' => array(),
'view' => 'grid-small',
'title' => '',
'link' => '',
'post__in' => '',
'posts_per_page' => '',
'hide_if_empty' => false
);
$args = wp_parse_args($args, $defaults);
extract($args);
$posts_per_page = absint($posts_per_page);
// Set default posts number if no specified
if(empty($posts_per_page)) {
if($view == 'grid-mini')
$posts_per_page = 8;
elseif($view == 'grid-small')
$posts_per_page = 6;
elseif($view == 'grid-medium')
$posts_per_page = 4;
elseif($view == 'list-small')
$posts_per_page = 3;
elseif($view == 'list-medium')
$posts_per_page = 2;
elseif($view == 'list-large')
$posts_per_page = 1;
}
$args['posts_per_page'] = $posts_per_page;
$args['title'] = ''; // fix WP 4.5 compatibility issue
$args = dp_parse_query_args($args);
$query = new WP_Query($args);
...
...
...
Now that we have the section boxe fixed, let's fix the sidebar...
...
...
...
extract($args);
ob_start();
$title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Posts', 'dp') : $instance['title'], $instance, $this->id_base);
$query_args = $instance;
$query_args['no_found_rows'] = true;
$query_args['title'] = '';
$query_args = dp_parse_query_args($query_args);
$r = new WP_Query( apply_filters( 'dp_widget_posts_args', $query_args ) );
...
...
...
I hope this help some people, if so please let me know in the comments.
PS: I am available for freelance work ;)
Bitcoin donations 1PvQBKRayC7URnwFivrgJS2EVnFptuy9KP
PS: I am available for freelance work ;)
Bitcoin donations 1PvQBKRayC7URnwFivrgJS2EVnFptuy9KP
Thank you!
ResponderEliminar10,000 thanks! it worked.
ResponderEliminarI will check.
ResponderEliminarGreat work.
Hi,
ResponderEliminarI checked the fix and that worked fine on my theme child!
Thnks man.
I was wordering if isn't could be useful to upload the full theme upfix to github in order to allow community continue to improving that theme...?
Themeforest license does not allow to do that :( otherwise I wouldn't mind to upload it to github
EliminarHi,
Eliminarthat will not be true at all because the author has abandoned the theme and the final version he delivered it is not fully compatible anymore. So this could be a good argument to free the theme and make it open source in benefit of actual users...
thanks you soo much Gustavo !!! you rock ;)
ResponderEliminarThank you SOOOO much! bugs originated by the same reasons caused our author.php page to malfunction, and now it's fixed! I'm so glad I found your blog!
ResponderEliminarThanks so much! Also fixed author.php!
ResponderEliminarme i am having problem in widget-comment.php
ResponderEliminarthere is a function...anyway i guess that how it's called and they say its obsolete and _construct() should be used instead, plz help
Amazing dear, thank you verrrrrrrrrrrrrrrrrrrry much..its worked
ResponderEliminarit is not working .. can you please help check and see?
ResponderEliminarwebsites: love4shares.info
THANK YOUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU !!!!!!
ResponderEliminarA beer is welcome ;)
EliminarThank youuuu from Brazil!!!!!!!!!!!!!!
ResponderEliminar