How to enable edit button in the theme’s customize UI?

I just had the same issue and with a little googling I found the following solution: // Add the selective part $wp_customize->selective_refresh->add_partial( ‘your_theme_second_logo’, array( ‘selector’ => ‘#yourID’, // You can also select a css class ) ); After you add the custom settings, you need to tell to WordPress what settings you want to manage … Read more

WordPress Admin is displaying Not Available

There are different reasons why this can happen. In your case I think it may be a security plugin that has changed the deafult login URL to something else. When I go to http://www.philenglish.com.cn/wp-login.php I get a 404 error, which is something such plugins also do: they make the default login URLs unavailable in an … Read more

admin-ajax returning 400 error when request is made with Fetch API

To make a working HTTP request with fetch API you have to do something like this. const form = new FormData(); form.append(‘action’, ‘make_appointment’); form.append(‘post_title’, ‘hola como estas’); const params = new URLSearchParams(form); fetch(ajaxSettings.ajaxurl, { method: ‘POST’, credentials: ‘same-origin’, headers: { ‘Content-Type’: ‘application/x-www-form-urlencoded’, ‘Cache-Control’: ‘no-cache’, }, body: params }).then(response => { return response.json(); }) .then(response => … Read more

How to make media upload private? [duplicate]

Searching this Stack, I can see two possible solutions for this question (not tested). One The answer is not fully developed, but can provide some insight. Restricting access to files within a specific folder Two How to Protect Uploads, if User is not Logged In? Frank Bueltge’s answer seems interesting but the code is quite … Read more

Using plural-only translation of register_post_status() in plugin

// Get the plural post status label $ps_status_label = $status->label_count; $submenu[$menu][] = array( sprintf( translate_nooped_plural( $ps_status_label, $ps_status_count ), $ps_status_count ), This should work as expected for the core translations. Now you need the textdomain, so lets search for the string you wish to translate foreach ( $GLOBALS[‘l10n’] as $domain => $data ) { if ( … Read more

All shortcodes not working on custom theme

So I finally found a solution!!! After many weeks of searching and trying different solutions, it was just a matter of removing “get_” from a reference of “the_content” in my page.php I changed this <?php function sup($text){ $true = preg_replace(‘#(\d+)(st|th|nd|rd)#’, ‘$1<sup class=”super”>$2</sup>’, $text); return $true; } echo sup(get_the_content()); ?> To this <?php function sup($text){ $true … Read more

What is a Network Activated Plugin Exactly?

Network Activate does pretty much what you thought it does: It activates the plugin on all sites in the network. It also takes it out of the default Plugin view on the plugins screen for all those sites, so they no longer have the option to either activate it or deactivate it. So if you’re … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)