Is a permastruct possible on pages?

Yes this is possible using the $wp->add_query_var function used together with add_rewrite_rule . Here you have an example: Passing and retrieving query vars in wordpress If you want more help here is a cut from one of my old plugins: function createRewriteRules() { global $wp_rewrite; $new_rules = array( ‘(.?.+?)/(stenskott)$’ => ‘index.php?pagename=”.$wp_rewrite->preg_index(2).”&ort=”. $wp_rewrite->preg_index(1), “(.?.+?)/(bilclas)$’ => ‘index.php?pagename=”.$wp_rewrite->preg_index(2).”&ort=”. … Read more

Exclude / Blacklist Permalinks

Interesting question. I found this post and tested, it worked for me: http://wpdreamer.com/2012/03/how-to-define-reserve-slugs-for-wordpress-posts-and-pages/ If you don’t want to edit your functions.php file an inelegant solution you can try is to create empty placeholder pages with the permalinks you’d like to reserve. If there is a physical directory on the server with that same name that … Read more

Permalinks not working with Vagrant

I solved the problem myself. In the default apache configuration, under /etc/apache2/sites-enabled, where mine is called 15-default.conf This was declared under the document root: <Directory “/var/www”> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny Allow from all </Directory> I had to change AllowOverride None to AllowOverride All. Thus you’ll get the following: <Directory “/var/www”> Options … Read more

Change in permalink structure made javascript cookie not work correctly

From comment: There is not enough information to answer your question. All your code is javascript, not PHP. Additionally, there is no function named “setCookie” or “getCookie” in javascript, and you don’t state what libraries you are using. The answer is most likely that your setCookie function is using the current page path (cookies have … Read more

Add custom post type name in term link?

Yes it is possible. For first it should be created new rewrite_rules compatible with WPML. This version add taxonomy slug to URL. (post_type/taxonomy/term) /** * Custom post type specific rewrite rules * @return wp_rewrite Rewrite rules handled by WordPress */ function cpt_rewrite_rules($wp_rewrite) { $rules = cpt_generate_archives(‘your_post_type_name’, $wp_rewrite); $wp_rewrite->rules = $rules + $wp_rewrite->rules; return $wp_rewrite; } … Read more

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