• Resolved augschburger

    (@augschburger)


    Hi – I use the Smooth-Slider plugin with shortcodes in sidebar widgets for a while. Today I changed something in this site (added a new sidebar) and now I have to disable wp-Typography to make Smooth-Slider working.
    If it’s enabled, the shortcode is displayed, i.e. [smoothcategory catg_slug=”partner”]

    I fiddled with wp-Typography settings (disabled Intelligente Zeichenersetzung and Typographische Anführungszeichen, added textwidget and widget_text to ignored CSS-classes), but with no success.
    For me it seems, that wp-Typography changes something in the shortcode before it is parsed by WP.

    This behaviour is reproduceable, if I enable wp_Typography and flush caches, the shortcode is displayed on the website. Once I disable wp-Typography and flush caches, the sliders are working again. I already disabled all other plugins and deleted and reinstalled Smooth-Slider with no success.

    Thanks for any hints!

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

Viewing 15 replies - 1 through 15 (of 32 total)
  • Plugin Author pepe

    (@pputzer)

    What widget are you using the shortcode in? (The problem is probably related to hyphenation, so you might try disabling that and “wrap long URLs” as well.)

    Normally wp-Typography runs after everything else (filter priority 9999, although that could be adjusted). Depending on the specific widget coding, the the_content filters might be applied manually before the shortcode is run, though.

    Thread Starter augschburger

    (@augschburger)

    With disabled hyphenation the sliders are shown. URL wrapping was already disabled.
    Once I enable hyphenation (and keep all other settings like they are after Alles zurücksetzen) the text [smoothcategory catg_slug=‚partner‘] is shown instead of the slider.

    Hopefully you can see the replaced Einfaches Anführungszeichen – in the editor I used an Auslassungszeichen (the one above the Raute).
    I use a simple text-widget and tried also to switch between “Visuell” and “Text” or single and double quotes with no difference.

    Plugin Author pepe

    (@pputzer)

    @augschburger: I assume you are using WordPress 4.8.x and the new HTML-capable text widget? I’ve just looked at the code and they now do something fancy with do_shortcode. I’ll have to have a closer look on how to properly make that work.

    In the meantime, you should be getting things running by adding remove_filter( 'widget_text', [ WP_Typography::get_instance(), 'process' ], 9999 ); to your theme’s functions.php.

    • This reply was modified 6 years, 5 months ago by pepe. Reason: Revised after code review
    Thread Starter augschburger

    (@augschburger)

    Yes, it’s WordPress 4.8.3–de_DE_formal and at this specific point I’m using the standard WordPress text-widget, nothing from the theme and not from a plugin.

    Trying to make it working now with your remove_filter trick…

    Edit: Nope – no succes. But thanks for your help so far, Peter!

    • This reply was modified 6 years, 5 months ago by augschburger.
    Plugin Author pepe

    (@pputzer)

    Ah, sorry, may fault. You’d have to wrap that in an action that runs after priority 10 of the init hook.

    function my_own_filter_remover() {
        remove_filter( 'widget_text', [ WP_Typography::get_instance(), 'process' ], 9999 );
    }
    add_action( 'init', 'my_own_filter_remover', 99 );

    should do it.

    Thread Starter augschburger

    (@augschburger)

    Perfect! Works now. 🙂
    Thanks again!

    Plugin Author pepe

    (@pputzer)

    @augschburger: As I’ve been experimenting a bit with different WordPress versions, do you use some plugin to enable shortcodes in the text widget? Because out of the box, only 4.9 will support that it would seem.

    Thread Starter augschburger

    (@augschburger)

    Hmm… I don’t think so. I’ve just looked through all plugins descriptions and there is nothing mentioned – only that I can use shortcode to display sliders, lists, etc.
    Also my functions.php is not doing something like that…

    I can’t remember exactly, but I think I’m using Smooth-Slider since one year or so on this site. With shortcode in the text-widget of the sidebars…

    Plugin Author pepe

    (@pputzer)

    I’m just asking because I try to recreate the environment as closely as possible and without adding a do_shortcode filter in wp-Typography, the Smooth Slider shortcode is ignored with WP < 4.9.

    Thread Starter augschburger

    (@augschburger)

    Me too… 🙂
    test.sico-systems.de is a plain WP 4.9 with only two plugins (wp-Typography and Smooth Slider), standard-theme – nothing else.

    Added a text widget into the sidebar with content [smoothrecent] and it’s computed correct only if wp-Typography is not activated (didn’t test all the wp_Typography settings, just on/off).

    I’ll downgrade to 4.8.3 now…

    Edit: OK – you are right.
    test2.sico-systems.de is not showing the slider, even if I delete wp-Typography. I’ll go ahead and install the plugins used on http://www.sico-systems.de&#8230;

    • This reply was modified 6 years, 5 months ago by augschburger.
    Thread Starter augschburger

    (@augschburger)

    I found two plugins, each enables shortcodes in the text widget:

    • “Animate It” by eLEOPARD Design Studios
    • “W4 Post List” by Shazzad Hossain Khan

    I used W4 Post List from the beginning, this is the reason why I never missed this function…

    • This reply was modified 6 years, 5 months ago by augschburger.
    Plugin Author pepe

    (@pputzer)

    Thanks. I’ll try to find a solution that works reliably with that plugin before and after WP 4.9. If not, I’ll probably just fix 4.9 and update the required WordPress version accordingly.

    Plugin Author pepe

    (@pputzer)

    wp-Typography 5.1.1 should fix the issue.

    Thread Starter augschburger

    (@augschburger)

    Cool, thanks! I’ve removed the filter from functions.php, cleared all caches and the sliders are working. 🙂
    One question: Is the hyphenation in text widgets disabled now by default? I’m asking, because on the homepage and on https://www.sico-systems.de/sico-systems/ the sliding text is not hyphenated…

    Plugin Author pepe

    (@pputzer)

    No, there’s nothing changed in that regard. The slider uses the <h2> tag, though. You might have disabled “hyphenate headings”?

    • This reply was modified 6 years, 5 months ago by pepe. Reason: Misread the code
Viewing 15 replies - 1 through 15 (of 32 total)
  • The topic ‘wp-typography stops shortcode from beeing computed’ is closed to new replies.