Please change code

Home Forums Gillion Theme Please change code

Home Forums Gillion Theme Please change code

This topic contains 8 replies, has 2 voices, and was last updated by  Shufflehound Support 1 week, 5 days ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • I make customization of the theme. And I would like to add new social to widget in child theme, but i can’t do it right.
    Please add this code before widget class. Thx!

    if(!class_exists('Widget_class_name')) {

    Hi @bo3gyx,

     

    I hope you are well today and thank you for your question.

     

    Could you please tell me which widget name you are referring to and tell me the theme file name where it is declared?

     

    Best regards,
    Shufflehound team

    Widget class name is “Widget_Social_counter” in inc/widgets/social-counter/class-widget-social-counter.php

    We will do it in the future version of the theme.

     

    Currently, you can change the widget in the child theme by copying the whole directory /gillion/inc/widgets/social-counter/ into the child theme with the same directory structure.

     

    Then in the below widget file, change the functions name from get_template_directory to get_stylesheet_directory on line number 172.

     

    /gillion/inc/widgets/social-counter/class-widget-social-counter.php

    Hello! I find bug, in shortcode “vcg_blog_posts_categories”.
    This is in file gillion/inc/elements/blog-posts-categories.php at line 494

    $posts = new WP_Query( array( 'post_type' => 'post', 'posts_per_page' => $limit, $cat_query => $cat_id ) );
    if( count($posts) > 0 ) : $i = 0;

    change it, for example:

    if( count($posts->posts) > 0) )

    Does the count($posts) not work for you?

    Yes, WP_Query don’t return posts array. You need to get posts from the object before counting.

    OK, I have also notified this to the theme developer to be fixed in the future version of the theme.

    The issue is fixed in the below latest version of the theme so please update the theme as described here https://support.shufflehound.com/updating-theme/

     


    Please login to access this file

Viewing 9 posts - 1 through 9 (of 9 total)