Please change code

Home Forums Gillion Theme Please change code

Home Forums Gillion Theme Please change code

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

Viewing 14 posts - 1 through 14 (of 14 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

    bo3gyx
    Participant

    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?

    bo3gyx
    Participant

    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

    bo3gyx
    Participant

    I updated theme to 3.2.4 but problem not fixed. https://yadi.sk/i/93kjU5YeWSq_Vw

    Actually the first one issue that is overwriting the widget class is fixed in this theme version and the Blog Posts Categories issue will be fixed in the next theme version.

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

     


    Please login to access this file

    The problem doesn’t resolved.

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

    wp_query is not an array. It is an object. Please fix it.

    I already wrote my decision above.

    I also found another problem.
    Slider does not work correctly for rtl locale.

    We found a better solution here https://wordpress.stackexchange.com/a/139622 which will be implemented in the future version of the theme.

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