Trouble hiding menu on single page

This should do it: .page-id-17091 div.fixed-header-box { display: none; } I’d generally prefer setting the theme up to not generate the header for that page, though, rather than hiding it after the fact.

wp_enqueue_media is not loading styles

There are some wp-admin styles you need to load. Since I cannot find any way to let wp_enqueue_style() accept url parameters, so I load styles by wp_head hook function here. add_action( ‘wp_head’, ‘load_admin_media_styles’, 10); function load_admin_media_styles(){ // list all style libs the post page of wp-admin loaded, but we may only need to load 2 … Read more

How to style archive post titles… but only those posts who have comments?

Use have_comments() function. Example: <?php if ( have_comments() ) : ?> <h2 class=”has-comments”><a href=”https://wordpress.stackexchange.com/questions/363222/<?php the_permalink(); ?>”><?php the_title(); ?></a></h2> <?php else : ?> <h2><a href=”https://wordpress.stackexchange.com/questions/363222/<?php the_permalink(); ?>”><?php the_title(); ?></a></h2> <?php endif; ?>

Trying to hide a button on a specific WordPress Page ID

so if you want to remove/hide only the button can do this: 1 – if you have a specific class that hide a element //$class = “youre class”; <button class=”<?php if(is_page($page_id)){ echo $class } ?>” onclick=”window.location.href=”https://example.org/about/”;”>About Me</button> 2 – inline style <button <?php if(is_page($page_id)){ echo “style=”display: none”; } ?>” onclick=”window.location.href=”https://example.org/about/”;”>About Me</button>

Keep comments but turn off commenting

What you’re describing is theme specific. The default themes don’t do this, and instead simply state that comments are closed: If comments are turned off, they change the comment form. But your theme appears to change the entire comment section instead of just the form. You’re going to have to either modify your theme or … Read more

Styles don’t load correctly. Insecure content

__DIR__ returns the current file system path, not a URL. So the resulting stylesheet will not be a valid URL, and will not have https://, causing the insecure content warning. To get the URL for a stylesheet in your plugin, you need to use plugins_url(): wp_register_style( ‘estilo’, plugins_url( ‘assets/css/estilo.css’, __FILE__ ) ); The use of … Read more

css to fit image by HEIGHT

Try giving your image a max-width instead of max height. img { width:100%; max-width:500px; /* this will stop it from expanding when you widen the browser height:auto; /* height will automatically adjust to width. } You didn’t give any specifications on if you image is a square or nested in a square div, but if … Read more