AnythingSlider for WordPress
Removing style tag from inside BODY (1 post)

  1. dariodev
    Posted 4 years ago #

    I'm trying to remove <style> tags from output, because style tags should not be in body, and add them in the wp_head.
    Here is original piece of code:

    $output .="
      #slider-{$id} { width: {$width}px; height: {$height}px; }

    So I'm trying to hook following function to add style tag in wp_head, but problem is that variables $id and $width cannot be passed into the function.

    function add_slide_style() {
    	echo '<style>';
    	echo '#slider-{$id} { width: {$width}px; height: {$height}px; }';
    	echo '</style>';

    Has anyone tried something like that?


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • AnythingSlider for WordPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic