title: How to add "blog" slug to wordpress posts?
body: <p>i am working on wordpress project that i have one diffuculty, i want to add "Blog" slug to blog posts</p>
  
  <p>for example 
  my current blog slug is like</p>
  
  <pre><code>http://www.abc.com/post
  </code></pre>
  
  <p>i want to make it like</p>
  
  <pre><code>http://www.abc.com/blog/post
  </code></pre>
  
  <p>i don't want to create custom post type i need to use existing ones</p>
  
  <p>i have tried many solution such as changing permalinks to blog/%postname%</p>
  
  <p>one solution worked for me</p>
  
  <p>below is my code</p>
  
  <pre><code>add_action( 'init', 'my_new_default_post_type', 1 );
  function my_new_default_post_type() {
  
      register_post_type( 'post', array(
          'labels' =&gt; array(
              'name_admin_bar' =&gt; _x( 'Post', 'add new on admin bar' ),
          ),
          'public'  =&gt; true,
          '_builtin' =&gt; false, 
          '_edit_link' =&gt; 'post.php?post=%d', 
          'capability_type' =&gt; 'post',
          'map_meta_cap' =&gt; true,
          'hierarchical' =&gt; false,
          'rewrite' =&gt; array( 'slug' =&gt; 'blog' ),
          'query_var' =&gt; false,
          'with_front' =&gt; false,
          'supports' =&gt; array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'post-formats' ),
      ) );
  }
  </code></pre>
  
  <p>i have added this code to my functions.php and added slug to posts. but problem came when i clicked on particular post it will redirected to 404 page. and if i remove this code it i will redirecting to correct post.</p>
  
  <p>need your suggesions.</p>