• Good day,

    Can I manage plugin work logic which depend on activated theme?

    I’ve two themes: one for desktop and tablets, one for handhelds. Device Theme Switcher are controlling switching for mobile users.

    I want to set different comments design for each theme. Can I deregister styles and enqueue my own?

    Also, I want to set another way to load more comments: lazy load for desktop and “Load More” button for mobile. Is there any hook to do that?

    Thank you for support!

    https://ww.wp.xz.cn/plugins/wpdiscuz/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Slams

    (@slams)

    Also, try to optimize your image resources.

    icon-link.gif 1184 bytes > icon-link.png 199 bytes for example.

    Plugin Author gVectors Team

    (@gvectors-team)

    Hi Slams,

    I want to set different comments design for each theme. Can I deregister styles and enqueue my own?

    Yes, you should deregister this css file:

    wp_register_style('wpdiscuz-frontend-css', plugins_url(WPDISCUZ_DIR_NAME . '/assets/css/wpdiscuz.min.css'), null, get_option(self::OPTION_SLUG_VERSION));

    And somehow you should close custom css:

    add_action('wp_head', array(&$this->css, 'initCustomCss'));

    Also, I want to set another way to load more comments: lazy load for desktop and “Load More” button for mobile. Is there any hook to do that?

    I can’t say an easy way for this. This requires lots of codding.

    Also, try to optimize your image resources.
    icon-link.gif 1184 bytes > icon-link.png 199 bytes for example.

    Thank you, good suggestion. We’ll do that.

    Thread Starter Slams

    (@slams)

    Thank you!

    I will try to dig into your code. Maybe will find solution. Do you have repo on github to
    fork?

    Consider images, Google Speed Test tell you what images are not compressed and offer you to download pre compressed images.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Options which depend on theme’ is closed to new replies.