Support » Plugin: Recently » Problem double widgets

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Héctor Cabrera

    (@hcabrera)

    How exactly are you adding these two widgets together at the bottom of the page?

    Thread Starter rianovost

    (@suryano11)

    Of course not! I add the first widget on the upper part (1 piece), the second widget on the lower part is also 1 piece. In the first widget, I include only the category number 6,they are successfully displayed at the top. In the lower part, only the category 80 is also displayed successfully, but on the main page, these 2 INDEPENDENT widgets at the bottom are connected to each other, despite the fact that in the settings, where the lower part, of course, it is not visible (because I did not add it), there is simply a duplication

    Thread Starter rianovost

    (@suryano11)

    The area of the first widget was created manually in index.php the string :

    <?php $postcounter = 0; ?>
    
    			<?php
    			
    			/**
    			 * generate_before_main_content hook.
    			 *
    			 * @since 0.1
    			 */
    			
    			do_action( 'generate_before_main_content' );
    
    			if ( have_posts() ) :
    
    				while ( have_posts() ) : the_post(); $postcounter++;
    
        if ( $postcounter == 1 ) {
        dynamic_sidebar('homeanonswidget1') ;
        }
    
        if ( $postcounter % 6 == 0 ) {
        dynamic_sidebar('homeanonswidget2') ;
        }

    . Perhaps because of this? The second area of the widget is created in the file footer.php, that is, in fact, they are not dependent

    ?php
    /**
     * generate_before_footer hook.
     *
     * @since 0.1
     */
    do_action( 'generate_before_footer' );
    ?>
    <?php dynamic_sidebar( 'wsidebar-4' ); ?>

    It is noteworthy that if you remove the second lower widget of your plugin and leave the first correct one, it is not duplicated, it seems that the second Lower widget “pulls” the first one

    Plugin Author Héctor Cabrera

    (@hcabrera)

    Sounds like a theme issue IMO but can’t say for sure without access to the code. Try switching to a different theme for a moment (eg. Twenty Twenty One) and see if you can replace the issue with it.

    If you don’t have a staging website then it might be a good idea to follow the instructions from this FAQ (second paragraph) so you can troubleshoot your website while allowing your visitors to browse it as usual: I need help with your plugin! What should I do? (you don’t need to deactivate your plugins though, just use this to switch to another plugin and test the widgets.)

    If you can reproduce the problem with a different theme then please share step-by-step instructions so I can replicate the problem on my development environment.

    Moderator Steve Stern (sterndata)

    (@sterndata)

    Forum Moderator & Support Team Volunteer

    @suryano11 Please don’t offer to send or post logon credentials on these forums:

    https://wordpress.org/support/guidelines#the-bad-stuff

    You can contact the author on their own site and, once there, the discussion is between the two of you. However, it is not OK to enter or send site credentials on these forums. We don’t want to encourage others (who are less reputable) to do similar things. It’s a fine line, but one that we need to enforce. Thanks for your cooperation.

    Thread Starter rianovost

    (@suryano11)

    Please don’t offer to send or post logon credentials on these forums:

    Well, I’ll know. Excuse me

    Thread Starter rianovost

    (@suryano11)

    If you don’t have a staging website then it might be a good idea to

    The problem is on your side! Only today installed on another site with a different theme, and the problem of your plug-in remains. Here’s a link https://sonasuren.ru

    Plugin Author Héctor Cabrera

    (@hcabrera)

    Ok, what should I do to reproduce the issue? Please be as detailed as possible.

    Thread Starter rianovost

    (@suryano11)

    Of course! All on points:
    1. I go to the admin panel of the site http://sonasuren.ru
    2.set the theme cute wp (This theme allows you to put widgets both from above and below)
    3. I put the widget “recently” on top of the site, the theme of the widget “cardview”, all is well, the widget is put perfectly
    4. Save
    6. I put the widget “recently” at the bottom of the site, the theme of the design “cardview compact” is also displayed successfully, but immediately as if a magnet pulls the top widget and “glues” himself on top.

    I think in great detail and in detail explained. Now the site is different, the theme is different, all plugins removed, but the problem remained. You apparently have a feature in the plug-in that combines all the widgets of one plug-in or cms wordpress not allows you to install more than one widget From one plug-in.
    Maybe you need to create another similar plugin with a different name? After all, gluing is precisely because of the native plug-in, the first top widget should not recognize that one of its “brothers” is installed at the bottom.

    Plugin Author Héctor Cabrera

    (@hcabrera)

    That was very helpful, thank you @suryano11!

    I was able to replicate the issue following your instructions and a new update will be available soon. Please upgrade to Recently 3.0.4 as soon as you can.

    Thread Starter rianovost

    (@suryano11)

    Well done dear Hector! It’s working now! Now your plugin helps me out, so much like my site is of different subjects and I can group the news on the page according to the rubrics and they will look neat! Thank you for your hard work!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Problem double widgets’ is closed to new replies.