Get parent page url to show up when it is in child pages

You can use something like this to get the parent page URL (and show its page title): <?php if ( $post->post_parent ) { ?> <a href=”https://wordpress.stackexchange.com/questions/192895/<?php echo get_permalink( $post->post_parent ); ?>” > <?php echo get_the_title( $post->post_parent ); ?> </a> <?php } ?> If you are running this code outside of the loop (thanks @BorisKuzmanov), then … Read more

Redirecting to old domain after migration

My issue is resolved, I am posting this as an answer so that someone else can benefit out of it. My issue was, siteurl and homeurl were not updated, so I have placed define(‘RELOCATE’,true); in my wp-config.php file. And again tried to access the website , it gone to the correct URL but all the … Read more

Add custom options to the wplink dialog

The dialog HTML comes from WP_Editors::wp_link_dialog() but no hooks in there. We could instead use jQuery to append the custom HTML to the link dialog and try to override e.g. the wpLink.getAttrs(), because it’s very short 😉 Demo example: jQuery( document ).ready( function( $ ) { $(‘#link-options’).append( ‘<div> <label><span>Link Class</span> <select name=”wpse-link-class” id=”wpse_link_class”> <option value=”normal”>normal</option> … Read more

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