Hyphenate sidebar widgets
-
I don’t know how to set hyphenation of sidebar widgets “Recent blog posts” and “Recent Facebook posts”. Is it possible at all? Thank you so much.
The page I need help with: [log in to see the link]
-
Which plugin or theme do you use for those widgets? I don’t think they are standard ones.
this theme: https://ww.wp.xz.cn/themes/nisarg/
and this plugin: https://sk.ww.wp.xz.cn/plugins/recent-facebook-posts/After looking at the code of the plugin, for Facebook widget you could use something linke
add_filter( 'rfbp_content', array( 'WP_Typography', 'process' ) );to yourfunctions.php.I was add it into theme functions.php also into wp functions.php, but doesn’t work:
Fatal error: Using $this when not in object context in /www/w/e/u113680/public_html/wp-content/plugins/wp-typography/includes/class-wp-typography.php on line 545Sorry, my fault for doing this by memory. Use
'filter'instead of'process'.thanks, it works perfect in text, but in headings still not.
I have checked Hyphenate headings.and I have one more question. I have checked Hyphenate headings but I don’t need hyphenate heading with some class. when I add this class into Ignore CSS classes it’s still hyphenate. this classes doesnt works for headings?
For the FB headings: There is no separate filter, but you can change
rfbp_contenttorfbp_outputto filter the whole widget.Regarding the usage of “ignore classes” with headings, it depends on the context. In general, if you add a class via a filter, it’s probably available for processing in wp-Typography. If you add it one of your templates, it is not.
thank you so much, fb recent posts works perfect
Great! Unfortunately, there is no filter hook for the builtin “recent posts” widget. You could hack something with output buffering, but that’s a bit more involved.
The topic ‘Hyphenate sidebar widgets’ is closed to new replies.