Child theme CSS not applying to element
Remove the marked ‘{‘ from line 295 of your child theme styles.css file. Check the bellow image to be sure what to remove.
Remove the marked ‘{‘ from line 295 of your child theme styles.css file. Check the bellow image to be sure what to remove.
Relative paths in css files are relative to the css file location, but in PHP they are relative to the website URL not to the php file location in the server. So to make sure you get the right URL for any resource you want to load in PHP files you can use the function … Read more
Yes, technically you can. But you shouldn’t load css in the footer, css links outside of the <head> are considered invalid. A better technique would be to add the css-links to the dom with javaScript. You may even want to split out the css so that critical portions are loaded inline (so you avoid a … Read more
You can/should prefix all your classes. That way you have very limited chance to have conflicting classes, which can cause unexpected behaviour on the front-end. So, instead of .container, you can use .mypluginprefix_container.
That would be because get_stylesheet_directory_uri only returns a value. If you want to echo it to to the screen you have to include echo or print. <img src=”https://wordpress.stackexchange.com/questions/35384/<?php echo get_stylesheet_directory_uri(); ?>/images/logo.jpg” /> bloginfo works fine as well, but when you do stylesheet_directory it’s just a wrapper for get_stylesheet_directory_uri <?php function get_bloginfo( $show = ”, $filter=”raw” … Read more
You need to use the body_class(): http://codex.wordpress.org/Function_Reference/body_class If you use the function body_class() you can set on your css like this: .example { display: none; } .logged-in .example { display: block }
This will not work when submitting your theme to wordpress.org, and this is one of the first things the theme reviewer will tell you to fix (I’m not even sure if these styles will pass the Theme Check test). For every CSS style, fonts, additional scripts, etc., before sending your theme to wordpress.org for a … Read more
By default, WordPress sets various classes to <body> depending on which page, template, parent, .. you are on. For a single post, some of these are single and single-post, so you could use the following body.single.single-post .post-meta { margin-right: 0px !important; }
What you need is post_class, a function that will add several classes linked to the post. You would use it in the main div around your loop and you can also add your own classes. In your case: <div ?><?php post_class (“col-xl-3 col-lg-4 col-md-4 col-sm-6 n-container-sm”) ?> > This will add the category name as … Read more
Technically speaking, there is no “standard” Post Format. Rather, “standard” is simply the default – as in, no Post Format type is defined. If no Post Format type is defined, get_post_format() simply returns null. I would suggest re-factoring your code above, and re-naming your icon images using the exact Post Format string. That way, you … Read more