Should I use relative or absolute urls when pointing to internal pages

It depends on what you’re talking about. If you’re talking about using just <a href=”https://wordpress.stackexchange.com/page-title”>Page Title</a>, then no. It’s better to use the full link. However, instead of using http://www.domain.com/page-title, it’s better to use <?php echo bloginfo(‘url’); ?>/page-title. The reason you don’t want to use relative links is the way wordpress permalinks work. If you’re … Read more

Rewrite url / permalink for default archive – yearly / monthly

You can do this without adding rewrite rules by changing the $date_structure of the $wp_rewrite instance of the WP_Rewrite class: function wpa116030_init(){ global $wp_rewrite; $wp_rewrite->date_structure=”about/blog/archive/%year%/%monthnum%/%day%”; } add_action( ‘init’, ‘wpa116030_init’ ); Visit your Permalinks settings page after adding this code to flush the rewrite rules.

Publish Post After Click On A Link

When the post is created and set to pending, build a unique identifier for auto-publishing, for example: $unique = md5( $post->post_content ); add_post_meta( $post->ID, ‘_auto_publish’, $unique ); Now create a link for the email: $link = get_permalink( $post->ID ); $link = add_query_arg( array( ‘autopublish’ => $unique, ‘pid’ => $post->ID ), $link ); Send this link … Read more