Custom branding / theme specified by URL

EDIT On second thought: no, both Themes couldn’t use the same database. If they did, they would have to have exactly the same settings, including active Theme, activated Plugins, and settings – which includes home_url(). There may be other ways to go about it, but this isn’t one. ORIGINAL ANSWER If I’m following your question … Read more

Rewrite a category

You cannot use the same term for a category, page, tag as they need to be unique. When you do, you’ll get a number next to the slug To fix them you’ll need to fix the tag or page slug otherwise edit the category slug last http://wordpresssites.net/links/how-to-edit-change-fix-duplicate-category-slugs-in-wordpress/

Non latin post slug truncate

No, it is not entirely possible. WordPress is using Percent encoding to sanitise the slug. You could undo this, and it would deliver nonlatin characters, but the browser would immediately swap these out for percent encoded characters when you tried to visit the page. Wether your database will store these characters, and the table encoding … Read more

WordPress custom search url

It’s easy. Just add this hook for template_redirect action and it will redirect your search queries to nice url: function wpse8170_search_url_redirect() { if ( is_search() && !empty( $_GET[‘s’] ) ) { wp_redirect( home_url( “/something/” . urlencode( get_query_var( ‘s’ ) ) ) ); exit; } } add_action( ‘template_redirect’, ‘wpse8170_search_url_redirect’ ); Add to your .htaccess file: # … Read more

Custom Post Types, URL rewrite on multiple CPTs

Assuming the code snippet provided works then extending the conditional statement like so will help you, function filter_post_type_link($link, $post) { if ($post->post_type=”custom_post_type_1″) { if ($cats = get_the_terms($post->ID, ‘custom_cat_1’)) $link = str_replace(‘%custom_cat_1%’, array_pop($cats)->slug, $link); return $link; } elseif ($post->post_type=”custom_post_type_2″) { if ($cats = get_the_terms($post->ID, ‘custom_cat_2’)) $link = str_replace(‘%custom_cat_2%’, array_pop($cats)->slug, $link); return $link; } else { return … Read more

Request parameters in $_GET do not match URL called

WordPress will typically filter off query arguments unless you tell it about those arguments and ask it not to. From this older tutorial, you can see how to add a new query variable to WordPress (so it won’t get stripped out): add_filter(‘query_vars’, ‘parameter_queryvars’ ); function parameter_queryvars( $qvars ) { $qvars[] = ‘myvar’; return $qvars; } … Read more

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