WordPress creating 404s under blog tags
WordPress creating 404s under blog tags
WordPress creating 404s under blog tags
Probably the below code should help you. function myadminurl() { // generate url path to Posts -> Categories page in the admin and force http $url = admin_url( ‘edit-tags.php?taxonomy=category’, ‘http’ ); echo $url; } add_action( ‘init’, ‘myadminurl’ ); Please refer this codex for more information.
This is the default because of a number of reasons. The first would be that you could still have a plan for your old URLs, or they are just temporarily not available, so WordPress defaults to this. If the default would be an 301, it could easily be that your previous URLs are indexed by … Read more
get_post_thumbnail_id() is going to default to using the $post global. That global is set to each post in turn as the Loop runs, so at the end of the Loop it will be set to the last post. The easiest thing to do would be to set $image before the Loop runs, but wp_reset_query would … Read more
There is no such thing as “URL that doesn’t exist” URL’s are just possible identifiers for pages on the internet. Every combination of characters as defined by the URL standarts is a valid URL. You can’t control what URLs people are using to find content, if they want to use URLs for content that do … Read more
I coudn’t solve it with a plugin or plain SQL, see this other question. Instead I exported all the posts with Tools > Data export > WordPress and deleted the posts. Then I run this python script over the exported XML file and imported the update xml file again. Tadaa… import re p = re.compile(r’http://([^/]*)/getfile/files.posterous.com/([^/]*)/([^/]*)/([^/]*)’) … Read more
You actually already were pretty close: function autoblank($text) { $return = str_replace(‘href=”https://wordpress.stackexchange.com/questions/138730/,”target=”_blank” href=”, $text); $return = str_replace( “target=”_blank” href=”‘ . get_site_url(), ‘href=”‘ . get_site_url(), $return ); $return = str_replace(‘target=”_blank” href=”#”https://wordpress.stackexchange.com/questions/138730/,”href=”#’, $return); return $return; } add_filter(‘the_content”https://wordpress.stackexchange.com/questions/138730/,”autoblank’); add_filter(‘comment_text”https://wordpress.stackexchange.com/questions/138730/,”autoblank’);
The reason this was not working is due to Localhost you apparently can’t do this without having a online wordpress site. Locally this is not possible.
On a very basic level, sub-pages inherit the URL segment of their parent page. A bit more complex, when creating custom taxonomies and custom post types you can define their slug for the WP rewrite engine. The documentation: http://codex.wordpress.org/Taxonomies#Custom_Taxonomies Neither is exactly what you’re looking for… Writing to .htaccess wouldn’t be that hard.
You can hook onto add_attachment and force the slug to work off the filename like so: Update: To uppercase the slug, you’ll need to add a temporary filter onto wp_unique_post_slug. You can’t simply use strtoupper( $slug ) as WordPress sanitises (lowercases) it within the update function. /** * Force attachment slug to ignore title from … Read more