New answers tagged

1

Duplicates don't just come from Pages and Posts, WordPress also defines Images and Files from the Media Library as "Posts". This means if you have a file / image in the Media Library with the same name as a page, it will assign the next duplicate a -2 ( from the wp_unique_post_slug() function ) so there's no URL conflicts. TL;DR - Duplicate? Search for ...


0

There is no way this kind of functionality exist without some plugin/code to implement it and without doing actual rewrites. Wordpress core do not know what is a "stop word" and do not believe in multiple URL for the same content. If a theme was changed, this might have been a code in the theme that was responsible for such a functionality.


3

You can accomplish this with add_rewrite_rule(). I personally like to show this example in a class to make it copy/paste ready. You could throw this in a plugin or functions.php -- some place that loads this code before query_vars, parse_request and init. The goal is to add rewrite rules, make sure you can add custom properties to the main query, then ...


1

Ok, i have some basic ideas. You can install a plugin called Redirection. And after that, you can make like and redirect to some other pages with you own data. but URL will change as the person redirect to the other specific page. Now if you want to them to land on the specific page... you need to make the folder into server directory under the main site ...


2

I'd put an is_user_logged_in conditional into my theme's 404.php. Then for logged in users show a form with the new slug as a hidden or uneditable field that creates a new page and redirects to the admin edit screen for that page.


1

Somehow the url must make clear that this is an editable link. So you need a filter on the_content that checks if there are internal links that do not yet exist. Alternatively, if you let users determine which links are editable you need to check if the url's they give perhaps already exist. The filter should set a class on the link. Here's a function to ...


0

You can use this function: static public function slugify($text) { // replace non letter or digits by - $text = preg_replace('~[^\pL\d]+~u', '-', $text); // transliterate $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text); // remove unwanted characters $text = preg_replace('~[^-\w]+~', '', $text); // trim $text = trim($text, '-'); // ...


0

The issue with your desired structure (and that categories without base are common request but commonly unreliable) is ambiguity. Each rewrite rule is like a tiny program, explaining WP how to turn URL into query variables. It is very important that WP can reliably distinguish which of the rules should handle particular URL. In plain words the usual case ...



Top 50 recent answers are included