style.css?ver=2.0c after upgrade 3.0

Posted in: Newsmag
Post count: 90

Hello, I’ve upgraded the theme to version 3.0, but the CSS version loaded is still 2.0c. If I clear the cache the site works fine, so I think that everything has been upgraded correctly. The problem is that not all users know how to clear the cache… Why these lines shows 2.0 instead of 3.0? I’ve sent you via email the URL of my website.

I’m not using any cache plugin on wordpress.

<link rel=’stylesheet’ id=’td-theme-css’ href=mysite.com/wp-content/themes/Newsmag/style.css?ver=2.0c’ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’td-theme-child-css’ href=’mysite.com/wp-content/themes/Newsmag-child/style.css?ver=2.0c’ type=’text/css’ media=’all’ />

Post count: 6535

Hi

That happens because you’re using child theme. When child theme is used the link to style css changes but the does not affect the pages if you don’t have customizations which breaks the page.

Thanks!

Post count: 90

I’m sorry but I don’t get your reply, do you mean that I can only wait that the css cache expries on users’ browser?

To be clear, my problem now is that some users see the theme like this (screen taken from another website here, perfectly showing my issue).
Again, not using any CDN or cache plugin.

What if I make the following change to the functions php files in the child theme?… I mean, change 2.0c to 3.0…. Please note that this is my full functions.php in the child theme.

NOW

<?php
/*  ----------------------------------------------------------------------------
    Newsmag 2.0 Child theme - Please do not use this child theme with older versions of Newsmag Theme

    What can be overwritten via the child theme:
		- please read the child theme documentation https://forum.tagdiv.com/the-child-theme-support-tutorial/

 */

/*  ----------------------------------------------------------------------------
    Here we add the parent style and the style.css from the child theme folder
 */
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 1000);
function theme_enqueue_styles() {
    wp_enqueue_style('td-theme', get_template_directory_uri() . '/style.css', '', '2.0c', 'all' );
    wp_enqueue_style('td-theme-child', get_stylesheet_directory_uri() . '/style.css', array('td-theme'), '2.0c', 'all' );

}

NEW

<?php
/*  ----------------------------------------------------------------------------
    Newsmag 2.0 Child theme - Please do not use this child theme with older versions of Newsmag Theme

    What can be overwritten via the child theme:
		- please read the child theme documentation https://forum.tagdiv.com/the-child-theme-support-tutorial/

 */

/*  ----------------------------------------------------------------------------
    Here we add the parent style and the style.css from the child theme folder
 */
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 1000);
function theme_enqueue_styles() {
    wp_enqueue_style('td-theme', get_template_directory_uri() . '/style.css', '', '3.0', 'all' );
    wp_enqueue_style('td-theme-child', get_stylesheet_directory_uri() . '/style.css', array('td-theme'), '3.0', 'all' );

}

Could this solve my problem?

  • This reply was modified 10 years by daimpa.
  • This reply was modified 10 years by daimpa.
Post count: 6535

Hi

No this it won’t be a solution because the file loaded on the site will be the same, that parameter is just a name. Try to deactivate the child theme then test the site again and check how it goes.
Let us know how it goes and if the problem persist please send us an email at contact@tagdiv.com with your login credentials and we will inspect this issue as soon as possible, also include a link to this topic.

Thanks!

Post count: 90

I’ve tried to change it to 3.0, and it seems to be working, probably it’s just a coincidence considering what you said. I can’t check by myself because I’ve cleared cache everywhere, but I’m not receiving any complaints from users. so I think it’s ok.

Just another question: I’ve used this code to add the “hamburger” icon for menu on mobile devices. No changes made to other files. It seems to be working, can you confirm that this is ok?

.td-icon-mobile:before {
content: ‘\e80e’;
}

  • This reply was modified 10 years by daimpa.
Post count: 6535

Hi

Yes this code will work and with V 3 of Newsmag theme.
Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic.