Custom Taxonomy in Permalink of Post

Assuming your custom taxonomy is called artist (and you don’t override the slug in the rewrite parameter) you can use the rewrite tag %artist%. WordPress implements almost every functionality to use those rewrite tags in post permalinks. There are only a few small adaptations necessary. Building the Permalink First, you’ll need to use the post_link … Read more

My permalinks are broken! Can I use mod_rewrite to ignore a physical file?

The reason that’s happening at all is because of content negotiation. /2011.html wouldn’t normally be accessible through /2011/, but content negotiation is making Apache automatically look for files named 2011 (whatever the extension) when it can’t find the folder before it passes control to WordPress. This can be quite useful, but if you don’t particularly … Read more

Page begins with number, WordPress adds 2

Within the wp_unique_post_slug function, checks are made to “Prevent new post slugs that could result in URLs that conflict with date archives.” Here’s the relevant code from line 3812 from wp-includes/post.php // Prevent new post slugs that could result in URLs that conflict with date archives. $post = get_post( $post_ID ); $conflicts_with_date_archive = false; if … Read more

What is the difference between get_permalink vs get_the_permalink?

Nothing. get_permalink() is the original function, and is used to get the permalink URL for a post. get_the_permalink() was introduced in 3.9 simply so the permalink function was consistent with the other post-related template tags, such as get_the_title(), get_the_content(), which are all prefixed with get_the_. The equivalent functions for echoing the result of those functions … Read more

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