WP Custom Permalink Filter

strlen(”) in substr_replace will always evaluate to 0, which doesn’t replace anything. It just inserts the new url at $pos. You could use this: function modify_attachment_link( $markup, $id ) { $pos = strpos( $markup, ‘href’ ) + 6; $remainstring = substr( $markup, $pos ); $pos2 = strpos( $remainstring, “‘” ); $url = substr( $remainstring, 0, … Read more

Update permalinks after domain change

Option A: Here’s a Quick Way to Search and Replace Your WordPress Database Option B: Export your database using phpmyadmin and open in a text editor such as (Notepad++), and use search/replace to find old domain and replace with new domain. MAKE SURE YOU BACKUP YOUR DATABASE BEFORE TAKING ANY ACTION

get_attachment_link() adds a hashtag to URL

As mentioned in the comments above, the problem is with the _s theme. The specific function causing the problem is _s_enhanced_image_navigation() in inc/extras.php. The problem can be resolved by changing the first if statement in the function to this: if ( is_admin() || ( ! is_attachment() && ! wp_attachment_is_image( $id ) ) ) return $url;

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