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

Customizing subject in comment notification e-mails

If I understand you correctly you want to change the subject line of the email. The hook of your code only changes the content of the e-mail. There’s a different hook for the subject: add_filter(‘comment_notification_subject’, ‘wpse_228315_comment_notification_subject’); function wpse_228315_comment_notification_subject($subject, $comment_id){ return “New comment”; }

How to allow HTML tags into WP Bakery (formerly Visual Composer) `textfield` parameter

You need to change the type from textarea to textarea_raw_html: https://kb.wpbakery.com/docs/inner-api/vc_map/ Under the section “Available type values” it says: textarea_raw_html: Text area, its content will be coded into base64 (this allows you to store raw js or raw html code) Although I’m not sure why they can base64 encode the output from this but not … Read more

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