Alter post slug by a filter that is fired just after a post is created
Alter post slug by a filter that is fired just after a post is created
Alter post slug by a filter that is fired just after a post is created
rewrite accepts a boolean or array, try: ‘rewrite’ => array( ‘slug’ => ‘projects’ ) make sure to visit your permalinks settings page to flush rewrites after you make the change.
How to prefix `attachment` permalinks with `attachment`?
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
Romes, The method you suggested will definitely work and is likely the easiest; however, I can definitely see cases in which this is not ideal. To accomplish this more “programmatically”, you would need to do the following: 1) Set a new query var 2) Generate a new rewrite rule to make sense of that query … Read more
You can’t add additional “folders” in the post editing screen. You would need to change your permalink structure, so that Posts include the Category in the URL. In Settings > Permalinks, choose “Custom Structure” and paste /%category%/%postname%/ Keep in mind this will change all your Post URLs, so you’ll need to add redirects. Also keep … Read more
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.
It is not possible by default. Your only possible way out of this is to create custom page templates which you can modify to display something like an index or any custom content When you create a new page in the back-end, choose this custom template, and make sure that your page slugs is named … Read more
how to use two permalinks for one custom post type
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