Rewrite Question

You can handle rewrites in a plugin or in your theme’s functions.php. I think something like this might work (assuming attachment_id and attachment_category are registered tags/variables. <?php add_action(‘init’, ‘myplugin_rewrite_rule’); function myplugin_rewrite_rule() { add_rewrite_rule(‘^portfolio/([^/]*)/([^/]*)/?$’, ‘index.php?attachment_id=$matches[1]&attachment_category=matches[2]’, ‘top’); }

Using 2 URL’s for WordPress

You can define the URLs by constants added in your wp-config.php. I suppose you already set up your System in the way that both domains point to the same WordPress installation. Now the only thing you need to check is which Domain is actually used. Your WordPress installation contains the first URL in the database, … Read more

Rewrite rule is catching pages not posts

You are using the pagename query var, so, like the name suggests, you are requesting a page with the specified name and not other type of content/post. If you want the rewrite rule works for all types of post (except attachments), you can use the p query var passing the post_ID as value. See the … Read more

Custom URL scheme – paramters on custom post type

Try rewrite endpoints: function wpse_143634_endpoint() { add_rewrite_endpoint( ‘info’, EP_PERMALINK ); } add_action( ‘init’, ‘wpse_143634_endpoint’ ); Now you’ll find you can visit any post and tack on info/whatever to the URL – WordPress will still load the post, except now you’ll have get_query_var( ‘info’ ) == ‘whatever’. Further reading: https://make.wordpress.org/plugins/2012/06/07/rewrite-endpoints-api/

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