Support » Plugin: WordPress Popular Posts » Widget setting is not working if used on homepage with elementor

  • Resolved Arun Saini

    (@arunsaini1611)


    Hi,
    The widget is not working properly on homepage, the thumbnail is not showing and view stats are automatically appearing even after disabling it. Though the widget working properly in theme sidebar but not on homepage.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @arunsaini1611,

    I’m not really familiar with Elementor. If the widget works as expected on a WordPress sidebar (which is the intended use case) then the problem is most likely Elementor itself.

    With that being said:

    • Are you seeing any error messages when you attempt to use the widget with Elementor (browser’s console log, WordPress’ Debug Log)?
    • Have you tried reaching out to the Elementor team to report the issue already? If so, what did they say?
    Thread Starter Arun Saini

    (@arunsaini1611)

    Did you check my homepage? Please check at https://jobvibhag.in/ (The middle column of hot jobs made by wpp plugin)
    It worked perfectly for one week then suddenly it stopped displaying thumbnails and starting showing views.

    Please check maybe the issue is with the plugin or I’m missing something in setting it up.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Did you check my homepage?

    I did. That, unfortunately, didn’t help.

    Please check maybe the issue is with the plugin or I’m missing something in setting it up.

    Please provide the information I requested on my previous reply. Otherwise it’ll be impossible for me to know what’s going on.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Ah, I just noticed you’re using a caching plugin! Did you clear WP Rocket’s cache after making changes in Elementor?

    Thread Starter Arun Saini

    (@arunsaini1611)

    Yeah I cleared wp rocket’s cache multiple times also tried clearing wpp plugin cache. But both didn’t work.

    There is no error message displaying while using the plugin.

    Check the two screenshots attached.
    First SS – https://prnt.sc/lir3uo
    – The setting when I open homepage edit with elementor and select the widget.

    Second SS – https://prnt.sc/lir4ma
    – I changed the widget setting but it’s still displaying old style.

    When I click the update after changing setting, The setting of the widget will again reset as in screenshot 1.

    Plugin Author Hector Cabrera

    (@hcabrera)

    When saving the widget options it should display additional settings for the thumbnail when you tick the “Display post thumbnail” checkbox (as I’m sure you already know). It’s not doing that for some reason, again probably due to a bug in Elementor itself.

    I politely asked you twice to provide error logs but so far you haven’t provided any. I guess I’ll have to install Elementor and try myself. I’ll get back to you once I have some news.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Just played around for a bit with Elementor and the WordPress Popular Posts widget. It’s not just the thumbnail option that’s not working, most of the options that can be activated/deactivated via checkbox (eg. “Shorten title”, “Display post excerpt”, “Display post thumbnail”, “Display comment count”, etc) aren’t being updated correctly when you click the Update button on Elementor’s Page Builder.

    Apparently, the problem is that Elementor is passing data back to the widget in an invalid format. WPP stores its options in a multidimensional associative array, Elementor is passing a single dimension associative array.

    What Elementor is passing to WPP:

    Array
    (
        [title] => 
        [limit] => 10
        [order_by] => views
        [range] => monthly
        [time_quantity] => 24
        [time_unit] => hour
        [post_type] => post
        [pid] => 
        [taxonomy] => category
        [term_id] => 
        [uid] => on
        [shorten_title-length] => 25
        [shorten_title-words] => 0
        [post-excerpt-length] => 55
        [post-excerpt-words] => 0
        [thumbnail-active] => on
        [thumbnail-size] => thumbnail
        [thumbnail-size-source] => manual
        [thumbnail-width] => 75
        [thumbnail-height] => 75
        [comment_count] => on
        [views] => on
        [author] => on
        [date] => on
        [date_format] => F j, Y
        [stats_taxonomy] => on
        [stats_taxonomy_name] => category
        [post-html] => <li>{thumb} {title} <span class="wpp-meta post-stats">{stats}</span></li>
    )

    What WPP is actually expecting to receive:

    array(
        'title' => '',
        'limit' => 10,
        'offset' => 0,
        'range' => 'daily',
        'time_unit' => 'hour',
        'time_quantity' => 24,
        'freshness' => false,
        'order_by' => 'views',
        'post_type' => 'post',
        'pid' => '',
        'author' => '',
        'cat' => '',
        'taxonomy' => 'category',
        'term_id' => '',
        'shorten_title' => array(
            'active' => false,
            'length' => 25,
            'words'	=> false
        ),
        'post-excerpt' => array(
            'active' => false,
            'length' => 55,
            'keep_format' => false,
            'words' => false
        ),
        'thumbnail' => array(
            'active' => false,
            'build' => 'manual',
            'width' => 75,
            'height' => 75,
            'crop' => true
        ),
        'rating' => false,
        'stats_tag' => array(
            'comment_count' => false,
            'views' => true,
            'author' => false,
            'date' => array(
                'active' => false,
                'format' => 'F j, Y'
            ),
            'category' => false,
            'taxonomy' => array(
                'active' => false,
                'name' => 'category'
            )
        ),
        'markup' => array(
            'custom_html' => false,
            'title-start' => '<h2>',
            'title-end' => '</h2>',
            'wpp-start' => '<ul class="wpp-list">',
            'wpp-end' => '</ul>',
            'post-html' => '<li>{thumb} {title} <span class="wpp-meta post-stats">{stats}</span></li>'
        )
    )

    In short, please ask the Elementor team to look into this. The issue is on their side. They’ll know what to do to fix it.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Widget setting is not working if used on homepage with elementor’ is closed to new replies.