Automatic short URL in posts

I installed yourls on a custom short domain. Then added an acf field to posts. Then when a post is added or modified, call yourls API to get the shortlink, and save that link in the custom field add_action(‘acf/save_post’, ‘update_related_posts’, 20); function update_related_posts($post_id) { global $old_field_value; // Check if the save is an auto-save, in … Read more

Leave login URL for my user beautiful

Assuming you’re trying to get rid of the ?redirect_to={url}, you can use the login_url filter to change the login URL, and remove unwanted querystring components with remove_query_arg(): add_filter( ‘login_url’, ‘wpse422493_strip_login_url’ ); /** * Strips `redirect_to` from the querystring. * * @param string $url The login URL. * @return string The filtered login URL. */ function … Read more

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