Permalinks without subdirectories

One solution would be to create all your pages as root pages and then use the Menu page in “Appearance -> Menus” to define the structure of the pages. This assumes that your theme supports Menus, which the default WordPress themes TwentTen and TwentyEleven do. Update: Here’s a couple of links that might help you … Read more

removing index.php IIS 7.5 webconfig

After struggling for a while in the web.config structure. I found out we need to clear the rule before to add another rule. Just add tag </clear> <?xml version=”1.0″ encoding=”UTF-8″?> <configuration> <system.webServer> <rewrite> <rules> <clear/> <rule name=”wordpress” patternSyntax=”Wildcard”> <match url=”*”/> <conditions> <add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true”/> <add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” negate=”true”/> </conditions> <action type=”Rewrite” url=”index.php”/> </rule> </rules> … Read more

Remove Custom Taxonomy Slug from Permalink

In your Settings > Permalink page, you would select the “Custom Permalink” radio button, and simply add: /%postname%/ . This will make it so that when you click on the “reviews” tag, that it should only show “http://www.example.com/reviews” when you are on the Archive page for reviews. HOWEVER, this may have adverse repercussions on the … Read more

Is it possible to list post attachments in a sub URL endpoint with a dedicated template?

I think I found it myself. Now I’ve successfully managed to add a /photos endpoint to a permalink URL, such as: http://mywordpressite.com/projects/a-project/photos And then a custom template, photos.php will load and show – with access to the global $post variable. Helpful links: http://codex.wordpress.org/Rewrite_API/add_rewrite_endpoint http://codex.wordpress.org/Template_Hierarchy In my functions.php I added functions for the single_template and query_vars … Read more

Rewrite user profile URL to be human friendly

The first step is to add a query var so WordPress will recognize it and parse its value in rewrite rules. function wpd_query_vars( $query_vars ) { $query_vars[] = ‘users_filter_name’; return $query_vars; } add_filter( ‘query_vars’, ‘wpd_query_vars’ ); Next, add a rewrite rule to capture the requests and set the users_filter_name: function wpd_user_rewrite_rule(){ add_rewrite_rule( ‘^user-profile/([^/]*)/?’, ‘index.php?page_id=31848&users_filter_name=$matches[1]’, ‘top’ … Read more

How to change the link structure of the homepage?

No need to change core files: add_action( ‘init’, ‘wpse316713_pagination_base_rewrite_rule’ ); function wpse316713_pagination_base_rewrite_rule() { global $wp_rewrite; $wp_rewrite->pagination_base=”image”; } Go to permalink options page, and press save to flush the rewrite rules, changes should apply afterwards.

Can’t change permalink url after hitting ‘ok’ and ‘update’

Have you somehow hidden/removed the slug metabox? (is something like this located in your functions.php?) function remove_post_meta_box() { remove_meta_box(‘slugdiv’, ‘post’, ‘normal’); } add_action(‘admin_menu’, ‘remove_post_meta_box’); If that’s the case, it’s causing the error. There is a Trac ticket for this already, but the only way to currently solve it is to remove it.

How to change the permalink structure of a master page?

To remove pagination prefix page in home page you should: add a rewrite rule which will translate the new link format, prevent redirection to address containing page, replace URLs in paging links. By creating pagination links, WordPress appends query var paged with mentioned prefix to url. Therefore, without modification, the links would look like example.com/3/page/3. … Read more

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