Author Nickname URL Friendly

You’ve already used sanitize_title once in you code. You need to use that in again, inside the wpse5742_author_link function. $link = str_replace( $author_nicename, sanitize_title($author_nickname), $link ); That should take care of the spaces. Another other option is to use urlencode but sanitize_title keeps things consistent. I (minimally) tested your code with that change and it … Read more

urlencode query string in gravity forms confirmation redirect

After digging a little deeper, I found that there is an action hook in Gravity Forms called gform_pre_submission. This allows me to modify a posted value before creating an entry or running the confirmation (see documentation). After that it was pretty basic: add_action( ‘gform_pre_submission_11’, ‘pre_submission_handler’ ); function pre_submission_handler( $form ) { $_POST[‘input_7’] = urlencode(rgpost( ‘input_7’ … Read more

Custom Post type permalink structure with custom_post_id

THE ANSWER First of all, this link helped me a lot https://premium.wpmudev.org/blog/building-customized-urls-wordpress It turned out the I don’t need to use add_rewrite_tag(), but to use add_rewrite_rule() to achieve my goal. I wondered why — %job_id% (or even %post_id%, tried them both) is not recognized in my permalink structure. I was expecting that %job_id% will be … Read more

How to delete unused URL?

Whenever you change the slug of a permalink on posts ( and custom post types with post capabilities ), WordPress will save the old slug in the post_meta table with the key _wp_old_slug. On a normal installation the old slug should redirect to the new slug using wp_old_slug_redirect(). There are a couple ways to remove … Read more

Special domain for a page

There is a plugin that does exactly this: https://wordpress.org/plugins/multiple-domain-mapping-on-single-site Anyway, it would be nicer to have things under control with an understandable few lines of script, so I’m still open to answers

Site URL always in front of other URLs

You need to start your links with http:// Examples: The link facebook.com/mypage becomes http://facebook.com/mypage The link www.commentorsite.com/ becomes http://www.commentorsite.com/ This will stop the links becoming http://mysite.com/www.commentorsite.com/ or http://mysite.com/facebook.com/mypage

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