Should there be a trailing slash in the permalink

It makes no difference performance-wise, if it did, there’d be something seriously wrong with WordPress. The same goes for Google, if a lot of super smart people earning 100k salaries can’t write software that handles a trailing slash, then something is terribly wrong with the world. Either way, WordPress puts the rel=”canonical” tag in the … Read more

404 with post name permalinks

I was able to figure out the problem, and for the sake of posterity, I’m posting the answer here. Basically, the new apache2.conf file that was added when I updated my web server had the following lines in it (my document root is /var/www): <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> … Read more

I need a custom permalink for my website

I’m not sure if I should assume that you were issuing your examples inside of the init hook, but if not that is the reason they weren’t working for you. So inside functions.php function sd_rewrite_rules() { add_rewrite_tag(‘%domain_name%’, ‘([^&]+)’); add_rewrite_rule(‘^/([^/]*)/?’,’index.php?domain_name=$matches[1]’,’top’); } add_action(‘init’, ‘sd_rewrite_rules’, 10, 0); Then if you wanted to retrieve the query variable to do … Read more

Link to blog index from template

if you are referring to the ‘posts page’ as set under dashboard – settings – reading: <?php if( get_option( ‘page_for_posts’ ) ) { echo get_permalink( get_option( ‘page_for_posts’ ) ); } else { echo home_url(); } ?>

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