What’s the default order used by WordPress to load CSS files?

I am working with a commercial theme on which I am making some style changes. Specifically, the parent theme shows a menu which I want to modify. The code for that menu is:

 <div class="mobile-navigation hidden-md hidden-lg">         <div id="close-menu-moblie">             <a href="#">                 <i class="icon-close icons"></i>             </a>         </div>    <div class="mobile-menu-container">         <ul id="menu-menu-movil" class="nav-menu mobile-menu">             <li id="menu-item-4723" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-4723 active">                 <a href="/" aria-current="page">La Familia</a>             </li>             <li id="menu-item-4724" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-4724">                 <a href="/tierras.html">La Tierra</a>             </li> 

So I created a child theme and added some CSS to it in its style.css file:

#menu-menu-movil li > a {     font-weight: 500;     font-family: Poppins, Arial, sans-serif;     } 

No way: the site ignores my changes. When I inspect the HTML I see that the browser is applying instead CSS instructions from the parent theme that target different classes:

.mobile-navigation .nav-menu > li > a {     font-size: 16px;     color: #1a1a1a;     font-weight: bold;     text-transform: capitalize; } 

So I think that it’s a problem with conflicting CSS instructions and their level of specificity or whatever… but then I try opening the CSS editor in WP Admin at "Appearance / Customise / Additional CSS" and pasting there my changes… and they work.

This led me to think: is there a default order in which WordPress loads CSS from all the possible places where they can be? ("Additional CSS", child themes, parent themes…). I seem to remember that there was, but after searching around on Google for a while I couldn’t find anything. Or is my problem in the end about CSS specificity?

cpanel: Reply “550 No Such User” with a Default Address

In cpanel, if I do not set up "Domain Fowarding", a 550 "No Such User" bounces email to non-existent email addresses on my domain.

If I do set up Domain Forwarding, email to a non-existent address is forwarded to the mailbox I designate in the Domain Forwarding.

I would like to use Domain Forwarding, but set up specific addresses to reply with 550 No Such User. How can I achieve this in cpanel?

The goal is to bounce mail to addresses that have become spam targets, while having a "catch-all" address for all other mail.


Default font in 2012?

I have no idea if I’m using ‘gutenberg’ or whatever. I’m simply trying to set a default fond in 2012 classic editor so I don’t have to change every paragraph I type in which is ridiculous. I see no easy/obvious way to do this. thx.

How to edit the default icon of Add Media button?

I am trying to replace the default Add Media icon in my WordPress site. I searched for the same on the web and got this:

How to replace default icon on "Add Media" button?

This seems to work for the OP, and ofcourse should’ve worked for others too. But, I am getting confused as the answer contains words like Child Theme and all. I could understand the first part of the answer, but I lost the track when the answer talked about this:

wp_enqueue_style('my-css', get_stylesheet_directory_uri().'/css/my-admin.css' 

From where did this part of the url came: '/css/my-admin.css. I searched in my database at the backend but couldn’t find this particular file anywhere. I know this might be a silly thing to ask, but this is it. Can someone help in this regard?

WooCommerce settings API set checkbox checked by default [closed]

Using WooCommerce settings API to create some options on its settings page: https://docs.woocommerce.com/document/adding-a-section-to-a-settings-tab/

Everything works fine but unfortunately, I can’t seem to get checkboxes to be checked by default (before admin actually saves changes…aka on fresh install)

I know I can create the option in the DB on plugin install but I’m trying to just get the checkbox checked by default without creating options on plugin activation.

I’ve tried multiple options

            'name'     => __( 'Field Name', 'lpac' ),             'desc'     => __( 'Field description', 'lpac' ),             'id'       => 'field_id',             'type'     => 'checkbox',             'default' => true, // doesn't work             'css'      => 'min-width:300px;',         ); 

I’ve tried setting the default to different values like ‘checked’ and ‘on’ but still, the checkbox is not checked by default

Setting fallback (default) image to featured image block

I was trying to make a block based theme and encountered a problem trying to set a default featured image in case some posts do not have them.

Basically, we used to do this in php

<?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } else { ?> <img src="<?php bloginfo('template_directory'); ?>/images/default-image.jpg" alt="<?php the_title(); ?>" /> <?php } ?> 

But now with blocks, themes are html and all I can see is

<!-- wp:post-featured-image {"isLink":true} /--> 

I couldn’t find any other parameters here nor an if/else block so I could just add a plain html.

If anyone has done this, that would be of great help.


How to set a default color for the WordPress Customizer’s color picker?

I’m developing a WordPress theme in which I’m adding a color control to the Customizer’s “Colors” section, so that the user can customize the footer’s background color.

I added a functioning color picker to the Customizer, but I can’t get the color picker to show a “Default” color and button.

I assigned a hex color value to the ‘default’ parameter in the Customizer setting associated with my color control, assuming this would be the default color for this control, but it just doesn’t work.

Instead of the “Default” button, my color picker shows a “Clear” button that clears the color input but doesn’t reset it to a default color.

My question is: How can I get the Customizer’s color picker to show a “Default” button instead of the "Clear" button?

Here’s the custom function I added to my theme’s customizer.php file:

function mytheme_customize_register( $  wp_customize ) {      $  wp_customize->add_setting( 'footer_color',       array(             'default' => '#000000',             'transport' => 'refresh',              'sanitize_callback' => 'sanitize_hex_color',       )     );      $  wp_customize->add_control( 'footer_color',       array(             'label' => __( 'Footer Color', 'textdomain' ),             'section' => 'colors',             'type' => 'color',             'capability' => 'edit_theme_options',       )     ); } add_action( 'customize_register', 'mytheme_customize_register' ); 

And here’s what the resulting color picker looks like. (Instead of the “Default” button, my color picker shows a “Clear” button that clears the color input but doesn’t reset it to a default color):

enter image description here

Is the default value of FORCE_SSL_ADMIN documented?

I got stuck for a while trying to understand how comes the site I’m managing performs HTTP to HTTPS redirection since:

  • I enabled SSL connection
  • I didn’t put a .htaccessfile
  • I didn’t set the FORCE_SSL_ADMIN constant in wp-config.php

Once I figured out the redirection was performed by WordPress and not the HTTP server, I ended up triying to do a massive grep -r 'FORCE_SSL_ADMIN' ./www, and I found this on default-constant.php (WordPress 5.7.2, line 328):

function wp_ssl_constants() {     /**      * @since 2.6.0      */     if ( ! defined( 'FORCE_SSL_ADMIN' ) ) {         if ( 'https' === parse_url( get_option( 'siteurl' ), PHP_URL_SCHEME ) ) {             define( 'FORCE_SSL_ADMIN', true );         } else {             define( 'FORCE_SSL_ADMIN', false );         }     }     /* [...] */ 

If I understand correctly, if the constant isn’t set and the siteurl entry (apparently the URL site value set in Setting page of the dashboard) begins is of scheme HTTPS://, then FORCE_SSL_ADMIN is set to true.

I may have wrongly searched, but what I found led me to think siteurl has to be set in order to let the redirection works, which is not the case.

Is this default behavior (redirection according to the site URL scheme) explained somewhere in the official documentation?

SSRS reports resets the parameters to default after I click on “View Report”

We are using SSRS version 16(build 13.0.x) in Native mode.

I built a report using Report Builder with 2 parameters(independent). Everything works as it should when I run the report in Report Builder.

When I publish it to WebPortal – some random set of users have the following issue:

  1. Through WebPortal URL, they click on the report to open in browser, we have always used chrome.
  2. They populate the parameters and click on "View Report".
  3. The report starts "Loading" and immediately the parameters are reset to default(or blank) and the report area goes blank. They couldn’t even see the column header or the menu bar in the report area.

Apart from a handful of seemingly random users, everyone else have no issues.

We use SQL accounts for authentication and all users have permissions to fetch data from tables. I checked if this issue is only with certain kind of parameters, but there seems to no common denominator.

I’ve come up dry on PowerBI, Technet forums. I appreciate any help/troubleshooting steps. Thanks 🙂