how to add custom css at top above all css file for specific url

/** * Enqueue stylesheet before others */ class EnqueueStylesheetEarly { function __construct() { add_action( ‘wp_enqueue_scripts’, [ $this, ‘load_before_other_stylesheets’ ], 5 ); } /** * Register and enqueue stylesheet */ function load_before_other_stylesheets() { wp_register_style( ‘bootstrap-css’, plugin_dir_url( __FILE__ ) . ‘bootstrap.min.css’, [], ‘3.3.7’ ); wp_enqueue_style( ‘bootstrap-css’ ); } } Then you can load this with your other … Read more

Installing Theme from uploaded file. Not uploaded theme?

You need to set the permissions locally in a UNIX environment: sudo chown -R www-data:www-data /usr/share/wordpress Also perhaps: chown -R nobody:nobody /path/to/wordpress Also try setting the FTP creds in the wp-config.php file: define( ‘FTP_USER’, ‘username’ ); define( ‘FTP_PASS’, ‘password’ ); define( ‘FTP_HOST’, ‘ftp.example.org:21’ ); Use “admin” or “root” for user and leave the password blank.

Shows warning when enable “wp_gallery_custom_links” plugin with Themify Builder

I have resolved this issue finally by making changes directly in “/wp-content/themes/themify-ultra/themify/themify-builder/templates/template-gallery-grid.php”. Try to find below lines. $link_before=”” != $link ? sprintf( ”, esc_attr( $image->post_title ), esc_url( $link ) ) : ”; $link_before = apply_filters( ‘themify_builder_image_link_before’, $link_before, $image, $settings ); And replace with, $custom_link = get_post_meta( $image->ID, ‘_gallery_link_url’, true ); $custom_link_target = get_post_meta( $image->ID, ‘_gallery_link_target’, … Read more

Edit box-header on WordPress Dashboard

I clearly didn’t know how to google, as this page already explains how to do exactly what I wanted. Adapting it a bit, for it to work with different post types, I came up with the following: add_action(‘do_meta_boxes’, ‘replace_featured_image_box’); function replace_featured_image_box() { $post_types = array(‘bwps’, ‘page’, ‘post’); foreach( $post_types as $post_type ) { remove_meta_box( ‘postimagediv’, … Read more

WordPress loads old style.css, then loads current one

Styles are loaded in the order specified in the underlying code. It’s usually under control of the theme. If a 2nd style file has the same style defined, then the 2nd one overwrites the ‘parameters’ of the 1st style. This is as designed. Note that it is not a good idea to edit a theme’s … Read more