366 posts
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Has been a member for 4-5 years
  • New Zealand
  • Referred between 10 and 49 users
  • Bought between 10 and 49 items
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
PixelStores says

I tried it and it works for me. Try var_dump on $topmargin, maybe that does not contain what you think it should.

hmm did the following,

$options = get_option('viroshop_theme_options');
$topmargin = $options['viro_top_margin'];
echo var_dump($topmargin); 

And the output was,

string(4) "55px"

So i take it the output is correct. Its very unusual why its not working everything seems to be in its place.

I even tried,

function my_styles_method() {
    wp_enqueue_script(
        'custom-style',
        get_template_directory_uri() . '/css/skin.css'
    );
        $custom_css =     "#header {
                            margin-top: '55px';
                           }";
        wp_add_inline_style('custom-style',$custom_css);
}
add_action('wp_enqueue_scripts', 'my_styles_method');

Yet still receive the token issues… :S

1466 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Croatia
OriginalEXE says

And with this code?

function my_styles_method() {
    wp_enqueue_script(
        'custom-style',
        get_template_directory_uri() . '/css/skin.css'
    );
        $custom_css =     "#header {
                            margin-top: 55px;
                           }";
        wp_add_inline_style('custom-style',$custom_css);
}
add_action('wp_enqueue_scripts', 'my_styles_method');
1466 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Croatia
OriginalEXE says

Oh, I was blind, BLIND!!! :P

You are using wp_enqueue_script while you should be using wp_enqueue_style :)

by
by
by
by
by
by