What’s the best way to complete links on a certain WordPress Page with everything after the slug?

So, I found a solution that seems to work great and as expected: function custom_username_links_modify_links($content) { global $post; $landing_page_id = get_option(‘custom_username_links_landing_page’); $registration_page_id = get_option(‘custom_username_links_registration_page’); if ($post && $post->ID == $landing_page_id) { $url_path = parse_url($_SERVER[‘REQUEST_URI’], PHP_URL_PATH); $url_parts = explode(“https://wordpress.stackexchange.com/”, trim($url_path, “https://wordpress.stackexchange.com/”)); if (count($url_parts) > 1) { $element = $url_parts[1]; $custom_username = get_user_meta(get_current_user_id(), ‘custom_username’, true); if (!empty($custom_username) … Read more

Is it possible to use the same slug structure for a taxonomy and for some pages?

Figured out a solution! This intercepts the query at parse_request, checks if a page with a matching slug exists, and if so, changes the request to a page request. /** * Fix rewrite conflicts between “project_category” and “page” * * @param WP $query * @return WP */ function prefix_parse_request_fix_rewrite_conflicts_project_category(WP $query): WP { if (isset($query->query_vars[“project_category”])) { … Read more

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