How to add Posts to a Page

I want to have a domain.com/blog page that includes all of my blog posts.

Problem is that currently to get to my blog, it looks like the permalink is going to always be…

Read More

domain/category/categoryname

I can change the permalinks but I dont want it to be something like domain.com/blog/featured or something.

I want to have a page that is domain/blog which will show all of my blog posts. Is there a way to do this?

My thought is simply creating a Page that includes all of my posts. How would I do this?

Thanks!

Related posts

Leave a Reply

4 comments

  1. Create an empty page with blog as title.

    Go to Settings -> Reading and choose a static page under Front page displays. Now set the posts page to blog that you just created and set a page that you prefer as frontpage.

    I hope this whas what you were asking about, if not just let me know.

  2. It is very possible. In my limited experience it is driven by the theme you choose. Many themes will have a page type you can select(single post, multipost, static, archive). This way you can determine which pages have your blog posts and which do not. You can then use the permalink settings to drive the final piece of the puzzle. I would encourage you to look at different themes and evaluate what works for your site. The one I use and have found flexible in this area is Atahualpa from http://wordpress.bytesforall.com/.

    MM/RC

  3. Why not create a shortcode?

    Add the following code to your functions.php and then in your page you can add a loop with various filters

    Example shortcode to put in your page: [loop the_query="showposts=10&cat=4"]

    function sp_loop_shortcode($atts) {
    
       // Defaults
       extract(shortcode_atts(array(
          "the_query" => ''
       ), $atts));
    
       // de-funkify query
       $the_query = preg_replace('~&#x0*([0-9a-f]+);~ei', 'chr(hexdec("\1"))', $the_query);
       $the_query = preg_replace('~&#0*([0-9]+);~e', 'chr(\1)', $the_query);
    
       // query is made               
       query_posts($the_query);
    
       // Reset and setup variables
       $output = '';
       $temp_title = '';
       $temp_link = '';
    
       // the loop
       if (have_posts()) : while (have_posts()) : the_post();
    
          $temp_title = get_the_title($post->ID);
          $temp_link = get_permalink($post->ID);
    
          // output all findings - CUSTOMIZE TO YOUR LIKING
          $output .= "<li><a href='$temp_link'>$temp_title</a></li>";
    
       endwhile; else:
    
          $output .= "nothing found.";
    
       endif;
    
       wp_reset_query();
       return $output;
    
    }
    add_shortcode("loop", "sp_loop_shortcode");
    

    I have used this method successfully on my sites.