@media in bluehost is being commented out [closed]

Media queries are not used by default. They are only used if the screen’s size matches one of the conditions. For example: @media only screen and (max-width: 1000px){ } Will only trigger if your screen size is below 1000px wide. If you are visiting the page and your screen is larger than this, the browser … Read more

What would I need to write into a custom plugin in order to add a switch for a custom string of CSS to the edit page?

This code should do the trick. Put this in your functions.php file. function add_custom_css_meta_box() { add_meta_box( ‘custom-css’, ‘Custom CSS’, ‘post_meta_checkbox’, ‘page’, ‘side’ ); } add_action(‘add_meta_boxes’, ‘add_custom_css_meta_box’); function post_meta_checkbox($post) { $checkbox = get_post_meta($post->ID, ‘custom-css’, true); $checked = false; if($checkbox == ‘true’) { $checked = true; } ?> <p> <label>Tick this for custom CSS</label><br /> <input type=”checkbox” … Read more

How to add condition in wordpress loop? [closed]

You don’t even need to write a conditional. This can be done by CSS. Let’s have a simple example. Assuming your post’s structure is like this: <div class=”container-class”> <p> <img src=”https://wordpress.stackexchange.com/questions/275291/some-path”/> Some text </p> </div> You can set a rule to float the first image to left, and the second one to right: .container-class img{ … Read more

Child theme problem

Am unable to comment and ask qns, so done as answer. Point 3 below does identify an error; the rest I expect you’ve covered. I’ve also added my own working enqueuer (but I only needed style.css) ensure the value specified for “Template:” at the top of your CSS matches the value for “Theme:” in parent’s … Read more

How to display pictures from database?

You’ll want to use wp_get_attachment_image_url() or wp_get_attachment_image(). You just pass them the ID of the image in the database and the size you want. wp_get_attachment_image_url() gives you the URL of the image: echo wp_get_attachment_image_url( $attachment_id, ‘large’ ); // http://example.com/wp-content/uploads/2017/01/image-1024×1024.jpg While wp_get_attachment_image() gives you a full image tag: echo wp_get_attachment_image( $attachment_id, ‘large’, false, [ ‘class’ => … Read more