• Resolved KeicH2O

    (@alexkeich)


    The plugin is just flawless, but I have a question. I want floating content in the Sidebar. The question is that when the minimum h3 is displayed, the table of contents is not displayed, but the widget itself remains visible. In other plugins this is not the case, but I found it with you.

    https://ibb.co/RQMYGKw
    https://ibb.co/DQcp7dR

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author WPJoli

    (@wpjoli)

    Hi,

    I am not sure I understand all of your problem.

    Can you explain this : “The question is that when the minimum h3 is displayed” ?

    Are you using the shortcode in a sidebar widget ? Because if you do, this means the TOC is wrapped within the widget. But, if your widget exists, then it will show up regardless of its content. So if the TOC is not shown for any reason, the sidebar widget will still show up but empty, and with whatever styles it comes with.

    What you bring up is interesting though, because there is no dedicated widget for now, and the shortcode alone cannot control the behaviour of a widget.

    Did you use a shortcode with other plugins or was it something else ?

    Thanks!

    Thread Starter KeicH2O

    (@alexkeich)

    You got it right. The fact is that I have set not to display the content if the H in the text is less than 3 pieces. The content is not displayed and the widget, as you say, is empty.

    Other plugins hide content along with the widget. I would be very happy if you implement this since your plugin is just epic: D

    Plugin Author WPJoli

    (@wpjoli)

    You may be able to achieve this with some CSS though.

    First, you need to find out your widget ID by inspecting the element (each widget has an auto generated ID by WP).
    When you find it, set it to display:none; in your theme’s style.

    Then, in the plugin’s custom CSS, add this line:

    #your-widget-id {
    display: block !important;
    }

    Basically your widget will be hidden at all times, BUT if the TOC is generated, so will its custom CSS and your widget will be set to actually display.

    Let me know.

    Plugin Author WPJoli

    (@wpjoli)

    I will mark this topic as solved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘the Sidebar widget is displayed’ is closed to new replies.