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.

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

Incorrect Theme and Upload URLs After Migration

Something went seriously wrong here. Is there a chance you can repeat the process on behalf of your client? Try to use Duplicator plugin it really helps with migrations. Or do a manual mysql dump on old hosting and import the database yourself. This definitely went wrong during the database migration.

dynamic image path within a javascript file

If you’re in JS you can’t use PHP (<?php ?>), you need to another way to get a PHP variable into JS. The normal way with WordPress is to use wp_localize_script(). wp_localize_script( ‘wpse_274344’, ‘myScriptObject’, array( ‘markerImageUrl’ => get_theme_file_uri( ‘/img/mapmarker.png’ ), ) ); Add that code after your call to wp_enqueue_script() or wp_register_script(). Replace wpse_274344 with … Read more

how to edit homepage

If the theme doesn’t have a dedicated admin page for customizing home page, most probably that text should be customizable via WordPress customizer: