Permalink Problems

There isn’t really enough code as an example to fully understand if there is any additional issues, but the main thing which is causing the URL’s to not work is the fact that the opening anchor tag is not closed. Adding a “> to the end of the first line should fix the issue. In … Read more

Permalink opens attachment instead of page

Attachments are stored with their filename (minus extension) as the post name. So if you uploaded an attachment that’s called map.xyz, it would have the same name as your page. So first, check your Media Library if you have a ‘map’ attachment. Secondly, check if your ‘map’ page still exists and still has the same … Read more

How to get the permanent link in a plugin?

globalize $post to get the current post’s data. also, you want get_permalink, which returns the permalink, rather than the_permalink, which directly echoes the permalink. function abcd_add_contents($content) { if (is_single()) { global $post; $extra_content = get_permalink( $post->ID ); $content .= $extra_content; } return $content; } add_filter(‘the_content’, ‘abcd_add_contents’);

Permalink target for recent post

The problem is that the functions the_title(), the_ID() etc. access the current post, which is the last post after the query has been handled completely. Put the following either in a text widget, wrapped in <?php and ?>, while having PHP execution enabled for text widgets (e.g., by using Exec-PHP and the like); in a … Read more

WordPress suddenly changed all links to example.com/example.com/

Check your .htaccess file for the proper values. Here’s what WP recommends; you may need to adjust for your configuration (from here; more examples that might help) https://codex.wordpress.org/htaccess # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress … Read more