Different ‘WP_CONTENT_URL’ for different subsites in Multisite setup?

Is it possible to set different WP_CONTENT_URL values for different sub-sites in wp-config.php ? Ans: Yes it is. If sub sites are installed on sub-domain, An example to define it this way – define( ‘CURRENT_SITE_DOMAIN’, $_SERVER[‘HTTP_HOST’] ); if( ‘sub1.domain.com’ == CURRENT_SITE_DOMAIN ){ define( ‘WP_CONTENT_URL’, ‘http://sub1-abcdefghijk.cloudfront.net/wp-content’ ); } elseif( ‘sub2.domain.com’ == CURRENT_SITE_DOMAIN ){ define( ‘WP_CONTENT_URL’, ‘http://sub2-abcdefghijk.cloudfront.net/wp-content’ … Read more

Saving Plugin settings to the database

I would store the array to the options able as a serialized value. update_option(‘dw_quotes’, serialize($quotes)); and retrieve with: $quotes = get_option(‘dw_quotes’, null); if ($quotes !== null) { $quotes = unserialize($quotes); } Other things to consider: Add handling in case the quotes option does not exist. Also add handling to delete quotes from the option table … Read more

Dynamically change feature image in customiser

The customizer has a special control for file uploads. Assuming that you already know how the theme customizer works, you would have to add four controls in this fashion: $wp_customize->add_control( new WP_Customize_Upload_Control( $wp_customize, ‘wpse215632_image_1’, array( ‘label’ => __( ‘First image’, ‘wpse215632_theme’ ), ‘description’ => __( ‘More about first image’, ‘wpse215632_theme’ ), ‘section’ => ‘wpse215632__section_id’, ‘settings’ … Read more

Displaying post per day

This is quite basic but should help you on your way. //Get posts for the current week $args = array( ‘date_query’ => array( array( ‘year’ => date( ‘Y’ ), ‘week’ => date( ‘W’ ), ) ) ); //Check for search query if ( isset( $_GET[‘s’] ) ) { $args[‘s’] = $_GET[‘s’]; } //Create these variables … Read more

Check if has any sidebar active on current page

I believe the issue here is a problem with vernacular. is_active_sidebar isn’t page specific — just checks to see if it has data within it throughout the entire site. You are asking a different question. Sounds like you are asking “does this template reference and sidebars AND do any of those sidebars have data in … Read more

Is the WordPress HTTPS Plugin Still Safe To Use? [closed]

If you are looking to use HTTPS, I reccomend following this wordpress guide: https://make.wordpress.org/support/user-manual/web-publishing/https-for-wordpress/#implementing-https-for-wordpress You can get a free SSL Certificate from: https://letsencrypt.org/ If you find difficulty setting it up, you can often pay your host a small fee to help set this up. Once set up, you just need to make sure all the … Read more

remove the wrapping of text widget or

More than likely this is an issue with the register_sidebar() call in functions.php. Look for before_widget and after_widget. The code below is the default usage. ‘before_widget’ => ‘<li id=”%1$s” class=”widget %2$s”>’, ‘after_widget’ => ‘</li>’, Note: This will alter all of the widgets within the sidebar, not just the TextWidget.