LarsMigrant
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Setting up separate responsive.css for a child themeThat did the trick, great, thank you ??
Forum: Developing with WordPress
In reply to: Setting up separate responsive.css for a child themeHm, follow-up, seems like I didn’t get everything quite right. As bcworkz suggested, copying all of responsive.css into my child theme wasn’t necessary, so I decided to just have the child theme’s responsive.css contain the actual changes I needed.
Doing so, however, I discovered that the responsive.css file of the parent seems to take priority. After looking closer with Firebug, I think I may have found the issue. Some function somewhere in WordPress appends a version number to the stylesheets, and appears to prioritize the newer sheet. I made this screenshot to demonstrate:
In the parent theme,
.menu-toggle
gives the hamburger menu an orange color (#e3633b). In my child theme’s responsive.css, I added an identical.menu-toggle
class with a green color (#50b200). The browser, however, ignores this. Note how Firebug lists it with a version number of 1.0 (responsive.css?ver=1.0). It does the same for everything I put in the child theme’s responsive.css file. Code from the parent theme’s responsive.css file, on the other hand, gets a version number of 4.7.3, which is equal to my current WordPress install.Would I be right in assuming that the browser prioritizes what it perceives to be the more up-to-date stylesheet? If so, how do I make WordPress append the “correct” version number to my child theme’s responsive.css?
I noticed that there was something about versions in the PHP I added to functions.php earlier. Perhaps the answer’s there somewhere? Here’s the exact PHP I ended up adding to my child theme’s functions.php:
function my_theme_enqueue_styles() { $parent_style = 'accesspress-parallax-responsive-style'; wp_enqueue_style( $parent_style, get_template_directory_uri() . '//css/responsive.css' ); wp_enqueue_style( 'APP_PM-style', get_stylesheet_directory_uri() . '/css/responsive.css', array( $parent_style ), wp_get_theme()->get('Version') ); } add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
- This reply was modified 8 years ago by LarsMigrant.
Forum: Developing with WordPress
In reply to: Setting up separate responsive.css for a child themeThank you both! Tried both variants, got both working, stuck with the final one since it seems semi-official ??
Forum: Fixing WordPress
In reply to: Images in posts automatically upscaled. Why?I got a screenshot, then measured the pictures in Photoshop. Also, if I click on a given picture and drag it (it’s URL in other words) into the URL field in Firefox, the picture that comes up will then be correctly sized. In other words, when I direct Firefox at the source image URL itself, rather than the picture as a part of the wordpress page, it shows up correctly.
I’ve never used browser zoom (weren’t even aware that it existed), but I’ve checked it now, and that’s not the problem.
Forum: Fixing WordPress
In reply to: Images in posts automatically upscaled. Why?After your last comment, I tried checking the site out in IE (I usually use Firefox), and apparently, it shows up fine there. So it would appear that Firefox is to blame here, not a setting in WordPress. Still, if it shows up like this in some (or all?) Firefox installations, I’d like to fix it. Any idea what could be causing it, or should I take the question to Firefox support instead?
I use Windows 7, and Firefox 3.6, if that could make a difference.
Forum: Fixing WordPress
In reply to: Images in posts automatically upscaled. Why?I tried that, but since I don’t use any kind of software in WordPress to process the images, no thumbnails are generated. I did untick the box, and tried running Regenerate, but it couldn’t find anything to process.
Forum: Themes and Templates
In reply to: Changing link colour in footer of Mandigo theme v. 1.40.1Excellent! That did the trick! Thanks a lot esmi ??