New answers tagged

0

The correct way: #adminmenu div.wp-menu-image:before { color: #000; <-- here } #adminmenu .wp-has-current-submenu div.wp-menu-image:before { color: #000; <-- here } And to make sure you get the hover state of the selected submenu #adminmenu li.wp-has-current-submenu:hover div.wp-menu-image:before, #adminmenu .wp-has-current-submenu div.wp-...


0

Another way of phrasing it is to just MOVE the body. The page-id class is applied to the body, so: body.page-id-9399 #gform_wrapper_3 { background-color: #363c42; } Would have worked


1

When you enqueue the style, you can use filemtime() as the version: <?php add_action('wp_enqueue_scripts', 'wpse_367594_enqueue_version'); function wpse_367594_enqueue_version() { wp_enqueue_style( // Update this to your slug. 'style-slug', // Update to your stylesheet URL if it's not the main style.css. ...


0

I was able to fix this issue after reading this post from the plugin author. Once I customised the shortcode attribute where I was using it in the text footer widget everything worked as intended. :-)


0

Have you tried inspecting the html code and css in the browser's dev console? It might be some "hidden" element only available when not loggedn in and that could be interfering. Usually you can see which css or element is causing this type of issues, just navigate through the elements


0

This just means you have an element breaking the constraints of the screen width; I bump into this issue every few sites when I’m building. Start first by looking at any fixed or absolute positioned elements. Then start looking at elements where you may have declared a fixed ####px value for their width. If that fails I usually open my Dev tools and hover ...


0

try adding overflow:hidden to the .wrap @media only screen and (max-width: 767px) #wrap { width: 100% !important; overflow: hidden; }


0

So there's two things we need to look out for here. We have to first make sure we specify to jQuery/javascript what it is that we're selecting. In this code you are targeting the HTML header element and then also targeting 'site-logo' but jQuery can't find an element named 'site-logo'. <script> jQuery(document).ready(function($) { $(window)....


-1

It is on the Privacy Settings of the browser that you are using. just turn off the section that said: Preload pages for faster browsing and searching Uses cookies to remember your preferences, even if you don’t visit those pages


0

I ended up using default stylesheet rules, which I had removed along the way, and then essentially what happens is when the user modifies the colors using the customizer it overrides the stylesheet rules. I feel like it's a bit sloppy doing it this way but it does achieve the desired result. From what I can see, though, there's no other alternative for the ...


0

I was implemented it for images, which shows lists of images inside a container like pdf viewer..I just overide the css property of bloc gallery class, and adding an additional class... .image-list{ position: relative !important; padding-bottom: 140% !important; overflow: hidden !important; border: 1px solid #ddd !important; } .blocks-...


0

You can try fiddling with the Z-index property of the main container for the widget. The z-index property specifies the stack order of an element. An element with greater stack order is always in front of an element with a lower stack order. Also, it would help in the future if you post your code as a reference, otherwise, it's harder to help you solve your ...


0

Are you creating your own theme? Or are you editing an existing theme? In either of the cases, I would advise you to learn more about CSS selectors and to learn how to use Chrome Dev Tools to inspect and change your CSS


0

Only valid php solution: 1) For Front-End: show_admin_bar(false); //same as: add_filter( 'show_admin_bar', '__return_false'); 2) For Back-End (tricky solution per hook): if ($from_dashboard_too) { remove_action( 'in_admin_header', 'wp_admin_bar_render', 0 ); //disables top margin add_filter( 'admin_title', function(){ $GLOBALS['...


0

What about using "add_editor_style( array|string $stylesheet = 'editor-style.css' )" ? "The parameter $stylesheet is the name of the stylesheet, relative to the theme root. It also accepts an array of stylesheets. It is optional and defaults to ‘editor-style.css’. This function automatically adds another stylesheet with -rtl prefix, e.g. editor-style-rtl....


0

In my theme functions.php at the end works for me: function themesCharles_enqueue_style() { wp_enqueue_style( 'my-theme', get_template_directory_uri() .'/myFiles/myStyle.css', false ); } function themesCharles_enqueue_script() { wp_enqueue_script( 'my-js', get_template_directory_uri() .'/myFiles/myScript.js', false ); } add_action( '...


-1

You should try this function. This will run only when the page template is charles. if ( is_page_template( 'charles.php' ) ) { // Enqueue the script and CSS here } Please try this and let me know.


0

The best way to achieve your goals would be to create a child theme, and copy whichever PHP file is responsible for the page you're wanting to edit into the child theme. You can then remove the links and additional information so that it's actually gone from the page. That way, no one will accidentally see the information you're trying to remove. (Screen ...


0

Please add this CSS in your file. Remove all the CSS that you have added for "pricelist" class. .pricelist a span{ border: 1px solid white; padding: 12px; } .pricelist a span.plus{ border:0; padding:0; } .pricelist a span .underline_dash{ display:none; } This CSS will make the nav as seen in the screenshot.


0

Disable the WordPress Admin Bar Using CSS You only have to copy and paste the CSS code below in Appearance > Customize > Additional CSS, or your style.css file. The CSS code to disable the toolbar is: #wpadminbar { display:none !important;}


0

The !important property in CSS is used to provide more weight (importance) than normal property. In CSS, the !important means that “this is important”, ignore all the subsequent rules, and apply !important rule and the !important keyword must be placed at the end of the line, immediately before the semicolon. In other words, it adds importance to all the ...


0

The problem comes from that the parent style is loaded twice : one with version ('?ver=1.0 etc, first on your picture and loaded by your parent theme with versionning on wp_enqueue_style ), another without (the second on your picture, called by your function php). To solve this : remove wp_enqueue_style( $parent_style, get_template_directory_uri() . '/...


0

Just need to remove the below code from the header.php inside the activated theme. <?php body_class(); ?>


-1

Need to remove this first : add_action('wp_enqueue_scripts', 'example_enqueue_styles'); And, please try this: function my_theme_enqueue_styles() { $parent_style = 'astra'; wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( $...


0

This is an css question, so really this is not the right place for it. However, you need to use the + operator and the :checked selector like this: (This assumes your radio buttons are built like this): <input type="radio" id="my_awesome_radio_1" value="value1" /> <label for="my_awesome_radio_1">Value 1</label> <input type="radio" id="...


0

I had the same issue when I hosted my site on Azure webapp service Linux. Try this plugin. take care when it active it works. https://wordpress.org/plugins/jsm-force-ssl/ This plugin uses native WordPress filters, instead of PHP’s output buffer, for maximum reliability, performance and caching compatibility (this plugin does not affect caching ...


0

You can use the body class to nesting each anchor tag. This is for the blog post page: .blog a:hover { color: #e164af; } And, this is for the blog post detail pages: .single a:hover { color: #e164af; }


0

Try this code in the currently existing theme for the dequeue style. add_action( 'wp_enqueue_scripts', 'mywptheme_child_deregister_styles', 11 ); function mywptheme_child_deregister_styles() { wp_dequeue_style( 'mywptheme' ); }


0

I have found your issue and it is "section" tag. You have written "section" tag inside the while loop. so it must need put "section" tag outside of the while loop and check it again. Hope it's works fine.


0

Found the answer! For anyone else with the this question, this worked for me: .entry-content a:not(.more-link):not(.wp-block-button__link):hover { color: blue; } Change colour for one you prefer :)


0

You can use the page ID then set the class to reflect it. For example: body.page-id-1,body.page-id-2,body.page-id-3 { background-color: green !important; }


0

Tony has it right, you can dequeue the style without the site having an error. That is because of the way CSS works. If the DOM can't find a specific CSS class/ID that is in the HTML it is simply ignored. Tony is also right, that you may need to add some styles back in if they were included in the, now removed, CSS file. If you were removing a JavaScript ...


0

This should get you started. It checks if the post was posted less than a day ago, and if it was, it will display a label that says new, which you can style. <?php if(get_the_date('Y-m-d-H-i-s') > date("Y-m-d-H-i-s",strtotime("-1 day"))) { ?> <span class="new-label">New</span> <?php } ?> You need to add this to your theme, in the ...


0

Turns out I was making the omission of adding 'a' as the link is actually an anchor. So the working code would be as ff: .custom-link a { color: white !important; font-size: 40px; } In terms of affecting only the text of the link in question.


0

If you put the universal styles in the parent theme's stylesheet, those will be applied regardless of child theme. They just have to be more specific than the child themes' styles. You won't have multiple identical stylesheets; MultiSite stores all sites' themes in one central location, and typically with a parent-child theme setup you include both the ...


-1

Use the wp_enqueue_style function, and put the path to the master CSS sheet in the source src="full-path-goes-here". See WP docs on function here: https://developer.wordpress.org/reference/functions/wp_enqueue_style/


Top 50 recent answers are included