How to export all post titles and urls?

Discussion in 'WordPress' started by Matt18, Nov 5, 2010.

  1. #1
    Hi

    I am looking for plugin or at least a way, to get all post titles and their urls (rewriten ones) out of my wordpress.

    Do you maybe know a way to do that?

    Thank you for your help in advance!
     
    Matt18, Nov 5, 2010 IP
  2. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #2
    I don't know a plugin which does it, but this script will do it:

    
    <?php
    $all_posts = get_posts("numperposts=-1");
    
    foreach($all_posts as $post){
        echo("<p><div>Post title: ".$post->post_title."</div><div>URL: ".get_permalink($post->ID)."</div></p><br />");
    }
    ?>
    
    PHP:
     
    s_ruben, Nov 5, 2010 IP
  3. Matt18

    Matt18 Guest

    Messages:
    591
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    that's strange :S I added it to a post and I got only 5 of them :S Any ideas what's wrong :S?
     
    Matt18, Nov 5, 2010 IP
  4. Matt18

    Matt18 Guest

    Messages:
    591
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Anyone please? I really need this :(
     
    Matt18, Nov 7, 2010 IP
  5. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #5
    Matt18,

    Add the code to a file (for example page.php) and open a page of the site. I think I has to work.
     
    s_ruben, Nov 8, 2010 IP
  6. alexsc29

    alexsc29 Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You can select themes in phpmyadmin
     
    alexsc29, Nov 8, 2010 IP
  7. Matt18

    Matt18 Guest

    Messages:
    591
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    tried it all. It just gives 5 posts :S
     
    Matt18, Nov 12, 2010 IP