Add %post_id% to slug of custom post type and prevent the “unique slug” thing that WP does?

I don’t have much experience with coding rewrites, but could you just add $post->post_name into your return statement? return home_url(‘equipment/’ . $post->ID . ‘-‘ . $post->post_name ); There are a few other ways to change the permalinks that I have used that may also help you: The easiest way to change your permalink structure is … Read more

Meta inserted through wp_insert_post gets messed up

So I ended up just adding the meta after inserting the post, which doesn’t give any error. It bypasses the problem without explaining it though… $postarr = array( ‘post_title’ => $link[‘caption’], ‘post_type’ => ‘ct_external_link’, ‘post_status’ => ‘publish’, ‘post_excerpt’ => $link[‘caption’], ); $external_link_id = wp_insert_post($postarr); if( !empty($external_link_id) ) { add_post_meta($external_link_id, ‘ct_external_link_url’, $doc[‘file’], true); if( isset($doc[‘hide’]) ) … Read more

How to get user details by name

“Users” are basically “authors” in WordPress so those pages are available at example.com/author/{user-name}/ (with or without the trailing slash) and what you are looking for is actually to change the “author permalink base” for the URL rewrite. eg: add_action( ‘init’, ‘set_custom_author_base’ ); function set_custom_author_base() { global $wp_rewrite; $wp_rewrite->author_base=”user”; } You can then add (or modify) … Read more

Cannot Save Changes After Updating URL Settings

This indicates that the SSL certificate was not installed correctly, or that the server is not configured to accept SSL connections. It is not an error with the certificate per se, but rather with the server setup / installation of that certificate. The web browser is failing to even connect to the server over HTTPS, … Read more

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