SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Wordpress Page to Post and vice versa

    Is there a tool that allows you to move a page to a post and vice versa within the Admin Center of Wordpress?

    I know I can copy and paste. I know I can change the post_type field in the database. Just looking for a tool that can do this at a click of a button.
    Wayne Luke
    ------------


  2. #2
    WordPress Freelancer banago's Avatar
    Join Date
    Dec 2006
    Location
    Vlorė, Albania
    Posts
    446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In my long experience with WordPress, I have not heard of such a too. Try to make a search - there might exist a plugin that does that.
    WPlancer.Com - PHP & WordPress Developer
    ProverbHunter - English Proverbs Explained

  3. #3
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yeah.. I looked and didn't find anything. I can just change it directly in the database.
    Wayne Luke
    ------------


  4. #4
    SitePoint Addict
    Join Date
    Mar 2006
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the wordpress function wp_update_post will do this. You just feed it the post id and tell it that post type should be 'page'.

    PHP Code:
    function post_to_page($postid){
      
    $thepost = array();
      
    $thepost['ID'] = $postid;
      
    $thepost['post_type'] = 'page';
      
    wp_update_post($thepost);



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •