Custom url for custom post types

Use add_rewrite_rule() function custom_rewrite_rule() { add_rewrite_rule(‘^nutrition/([^/]*)/([^/]*)/?’,’index.php?page_id=12&food=$matches[1]&variety=$matches[2]’,’top’); } add_action(‘init’, ‘custom_rewrite_rule’, 10, 0); you can use if ( ‘myposttype’ == $post->post_type ){} to make it post type specific. Weather you want to add it inside the function or wrapping the add action is up to you.

Domain name to a page

Add these values in your wp-config.php define( ‘WP_HOME’, ‘http://www.example.com’ ); define( ‘WP_SITEURL’, ‘http://www.example.com’ ); These will overwrite your database values with above. This is a temporary fix. But to fix this issue permanently. You will have to change URLs in database. You can run these mysql queries to change your URLs from http://100.100.100.100 to http://www.example.com … Read more

Creating custom URL for async content

In general the pretty permalinks are domain of Rewrite API in WordPress. But they convert the links into query variables for back–end PHP side of it. Hashbang links are domain of JavaScript. It is impossible to say how easy would be to change them, without very specific knowledge of how theme’s JS implements them.

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