How to remove the link of an image on WP 4.2

The option for setting the url to none using “Attachment Display Settings” is available through the gallery option, using “Add Media”. How are you adding your images—through featured image or directly in your post/page? You can remove the my image if it’s in the post itself. For featured images, you’ll have to go into your … Read more

Ignore postname in permalink

Being in wp-admin/options-permalink.php (Permalinks) you can easily set this using Custom Structure: /%post_id%/%postname%/ So you can browse the Hello World post with: http://example.com/1/hello-world/ But if you strip out the postname from the URL like below: http://example.com/1/ You can still access the Hello World post. CAUTION Changing permalink in any live site may cause bad effect … Read more

Add custom query vars to pretty permalinks

Use add_rewrite_rule to capture the url and convert to params internally. http://example.com/page{p}/t/{t} to http://example.com/?p={p}&t={t} Add to your function.php or in a plugin. <?php if ( ! class_exists( ‘SimpleRewrite’ ) ): class SimpleRewrite { const ENDPOINT_QUERY_NAME = ‘page’; const ENDPOINT_QUERY_PARAM = ‘__rewrite_page’; // WordPress hooks public function init() { add_filter( ‘query_vars’, array ( $this, ‘add_query_vars’ ), … Read more

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