• Resolved agbuere

    (@agbuere)


    Hello, I want to migrate the classic wpp block to shortcode because of that “deprecated” message. I am using classic widgets and as of now everything is still working fine. Nevertheless, I want to migrate, because you say the classic block will cease to operate some time in the future. But I can’t use shortcodes with classic widgets, it just shows the text of the widget. How do I use shortcodes with the classic widgets? Kind regards

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

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter agbuere

    (@agbuere)

    Well, I found out how to do it, one needs a text block. But the display now is very different and I can’t find the option to exclude items. I want a list as it was before, why is the design changed? And how to get back the old design? Kind regards

    Thread Starter agbuere

    (@agbuere)

    Found the exclude option (pid). But I can’t get the display to be as before. Before, it was a list separated by lines and just the post titel. Now, I have no separating lines and there is an uggly bullet before the post title. I really can’t find an option to retrieve the old design. Please help. Kind regards

    Thread Starter agbuere

    (@agbuere)

    I experimented a lot with wpp_start and wpp_end now. There seems to be no way to get the old design (a list separated by lines). But the new design is uggly. Again, please help. Kind regards

    Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @agbuere,

    If you share your site’s URL and explain what needs to be fixed (I don’t know what “ugly” means to you :P) I may be able to help.

    Thread Starter agbuere

    (@agbuere)

    Well I had it disabled. Now I re-enabled it and you can see the new (uggly) and the correct version both. The site is https://agbuere.blog Thanks a lot for your help. Kind regards

    Thread Starter agbuere

    (@agbuere)

    NOW I figured it out. It needs the “Block” Element (not “Text”, not “HTML”). Then in this the title needs to be set before the [wpp] shortcode, for example: “<h2 class=”widget-title”>Title</h2>[wpp range=’last30days’ stats_views=0]”.

    You may close this thread, thanks for your reply & willingness to help. Maybe it helps someone with a similar problem.

    But the Ajax Support seems to be missing now, no idea how to get that in again?

    Kind regards

    • This reply was modified 1 year, 9 months ago by agbuere.
    • This reply was modified 1 year, 9 months ago by agbuere.
    Plugin Author Hector Cabrera

    (@hcabrera)

    You may close this thread, thanks for your reply & willingness to help.

    Glad you were able to figure it out! Had to step out for a bit and just saw your comments.

    But the Ajax Support seems to be missing now, no idea how to get that in again?

    Unfortunately the shortcode doesn’t provide AJAX support at this time. I might add it at some point in the near future now that the widget is being deprecated.

    There are ways to sort of add AJAX support but it requires some PHP coding and you’d lose the ability to edit the shortcode from the WP Dashboard. If you’d still want to give it a try I can show you how.

    Thread Starter agbuere

    (@agbuere)

    Well, I think I’ll go without AJAX then. I am not so sure if I need it, as far as I understand it’s only relevant for pages with high traffic and I think the traffic on my page isn’t so high that AJAX functionality is really required. Thanks again for your help, kind regards

    Plugin Author Hector Cabrera

    (@hcabrera)

    Quick update @agbuere: since I was curious, I just managed to implement AJAX support for the shortcode ?? It’s not ready for the public yet as I need to test this thoroughly but overall it’s looking good.

    Hopefully this new feature will be included with WordPress Popular Posts 6.2 (no ETA though, soon probably).

    Thread Starter agbuere

    (@agbuere)

    Hey, cool! Looking forward to V6.2! Best wishes

    Hi, pardon me for reopening this thread. I have added a “Block” and managed to add in the shortcode:

    <h6 class=”widget-title”><strong>Popular Posts</strong></h6>[wpp range=’last30days’ stats_views=0]

    But I was not able to get it to look the same as before. I have tried to edit the settings.php at:

    'markup' => [
                    'custom_html' => true,
                    'title-start' => '<h2>',
                    'title-end' => '</h2>',
                    'wpp-start' => '<class="wpp-list">',
                    'wpp-end' => '</class>',
                    'post-html' => '{title}<br>'
                ]

    However, it did not work. May I know how can I style it to look similar to before? Thank you.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @symphonyoflove,

    Could you please open a new topic? That way we won’t spam agbuere with messages.

    Don’t forget to include:

    1. Your site’s URL.
    2. How your popular posts looked like before (might have to undo whatever you did so I can see it).

    Thanks in advance!

    • This reply was modified 1 year, 9 months ago by Hector Cabrera. Reason: Added link to the new topic form

    Yes, Hector, sorry. My oversight.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘How to use shortcode with Classic Widget’ is closed to new replies.