Replacing words in WordPress or theme (not in content)

These would be in your template. The Template File Hierarchy can be found here, and can help locate the specific template for the page you are looking at: https://developer.wordpress.org/themes/basics/template-hierarchy/ The plugin, Show Current Plugin, can also help: https://wordpress.org/plugins/show-current-template/

When should I not use WordPress? [closed]

This is a very broad question, that do not have one good answer. Each answer will depend on the type of site being build, relevant available hardware and software, available 3rd party libraries, end user familiarity with core UI/UX, ease of maintenance and/or contracting people to perform maintenance. For example, if you are a microsoft … Read more

WooCommerce custom billing fields on email address

I finally got it to work using this code: I’m using a php class to make an organized workflow so don’t mind the public on functions… First I register my filters like this: public function registerFilters() { add_filter( ‘woocommerce_default_address_fields’, array($this, ‘woo_new_default_address_fields’), 10, 2); add_filter(‘woocommerce_order_formatted_billing_address’, array($this, ‘woo_custom_order_formatted_billing_address’), 10, 2); add_filter(‘woocommerce_formatted_address_replacements’, array($this, ‘myFunction’), 10, 2); add_filter(‘woocommerce_localisation_address_formats’, array($this, … Read more

Add the site’s name as prefix when adding new users? Multisite

I have noticed that the code our friend shares has an error. Add the prefix twice. I share other code with this error resolved. <?php add_filter( ‘pre_user_login’, ‘sneakily_add_prefix_to_username’ ); function sneakily_add_prefix_to_username( $username ) { if ( ! current_user_can( ‘manage_network’ ) ) { $blog_id = get_current_blog_id(); $blog_details = get_blog_details( $blog_id ); $sanitized_path = str_replace( “https://wordpress.stackexchange.com/”, ”, … Read more

Is there a possiblity to replace profile image gravatar with custom user images

Yes you can use ACF Pro to achieve that First create a field for user image (here: tsm_local_avatar) then filter the get_gravatar function: <?php /** * Use ACF image field as avatar * @author Mike Hemberger * @link http://thestizmedia.com/acf-pro-simple-local-avatars/ * @uses ACF Pro image field (tested return value set as Array ) */ add_filter(‘get_avatar’, ‘tsm_acf_profile_avatar’, … Read more

Good way to customize admin CSS?

What theme are you using? I would probably start with making a child theme. This will give you more control over when styles are loaded. Here is an example of loading the parent theme styles and then your child theme styles. function my_theme_enqueue_styles() { $parent_style=”parent-style”; // This is ‘twentyfifteen-style’ for the Twenty Fifteen theme. wp_enqueue_style( … Read more