1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[METHOD] Autoposting Posts to Wordpress (code included)

Discussion in 'Blogging' started by puiks, May 9, 2014.

  1. puiks

    puiks Registered Member

    Joined:
    Oct 27, 2013
    Messages:
    54
    Likes Received:
    10
    Hello BHW!

    As you can see from my post count, I am not wery experienced in IM.
    I figured this out because I needed myself to post .txt files to wordpress as posts, so I tried to find some solution but couldnt find one (There was ZipPoster which I think is long gone). So I made way out of this situation by myself. This is my first share on BHW so dont be too strict, and dont say this suck, but well it is a bit complicated. So here we go. (I will breafly explain the method, I am not in a mood to write down super detailed guide, sorry ;) )

    1. You will need your articles in .txt format, and file name must be the title of your article. You can easily scrape this kind of articles with get article scraper lite.

    2. When you have your articles head to MS Excel and open VBA developer and copy this code.
    Code:
    [COLOR=#000000][FONT=Arial]Sub macro_1()[/FONT][/COLOR][COLOR=#000000][FONT=Arial]Dim fso, fil[/FONT][/COLOR]
    [COLOR=#000000][FONT=Arial]Set fso = CreateObject("Scripting.filesystemobject")[/FONT][/COLOR]
    [COLOR=#000000][FONT=Arial]For Each fil In fso.getfolder("C:\Records\").Files[/FONT][/COLOR]
    [COLOR=#000000][FONT=Arial]If fil.Name Like "*.txt" Then[/FONT][/COLOR]
    [COLOR=#000000][FONT=Arial]Range("A" & Rows.Count).End(xlUp).Offset(1, 0) = Left(fil.Name, Len(fil.Name) - 4)[/FONT][/COLOR]
    [COLOR=#000000][FONT=Arial]Range("A" & Rows.Count).End(xlUp).Offset(0, 1) = fso.opentextfile(fil).readall[/FONT][/COLOR]
    [COLOR=#000000][FONT=Arial]End If[/FONT][/COLOR]
    [COLOR=#000000][FONT=Arial]Next fil[/FONT][/COLOR]
    [COLOR=#000000][FONT=Arial]End Sub[/FONT][/COLOR]
    As you can see, this macro will take all .txt files from C:\Records\ and will copy in first column Names of files (Article Titles) and all text in other colum. Save this file in .csv format.

    3. Head ower to your Wordpress dashboard and instal plugin called WP Ultimate CSV Importer (you can install other CSV file importers asvell, I am not trying to promote that plugin, I used it because it was most popular one, and was updated)
    Ok I will not explain how to go on from here, because there are tutorials how to use that plugin. And there are examples of .csv files.

    Yes In thees examples are many more columns which you can add, but in between lines you have all what you need to automate your article posting to wordpress.
    All other minors adjustments you can make yourselves. Hope someone will find this useful :cool:

    P.S Sorry for any grammar mistakes, if there was any, Im not native english speaker.
     
    • Thanks Thanks x 2
  2. Conor

    Conor Jr. VIP Jr. VIP

    Joined:
    Nov 7, 2012
    Messages:
    3,356
    Likes Received:
    5,418
    Gender:
    Male
    Location:
    South Africa
    Home Page:
    Thanks for the share OP. I probably won't test it out at the moment, but it looks sound.

    BTW: Post count has nothing to do with IM experience. Some people just have more free time. ;)
     
    • Thanks Thanks x 1
  3. undint

    undint Newbie

    Joined:
    May 21, 2012
    Messages:
    23
    Likes Received:
    6
    Thank you for sharing, but beware: are you planning to use scraped articles on your WP blog? For what purpose?
     
    • Thanks Thanks x 1
  4. naskootbg

    naskootbg Power Member

    Joined:
    Nov 8, 2010
    Messages:
    574
    Likes Received:
    201
    Home Page:
    Maybe you must try imacro plugin for ff or chrome. You can easy find info about. It can do the same, but direct from text file to multiple blogs - even schedule posts.
     
    • Thanks Thanks x 1
  5. puiks

    puiks Registered Member

    Joined:
    Oct 27, 2013
    Messages:
    54
    Likes Received:
    10
    I have some things in mind :cool:
     
  6. puiks

    puiks Registered Member

    Joined:
    Oct 27, 2013
    Messages:
    54
    Likes Received:
    10
    Yes iMacros could do the trick, didnt think about that. Thanks for advice.
     
  7. indianfreak

    indianfreak Power Member

    Joined:
    Jan 4, 2008
    Messages:
    541
    Likes Received:
    380
    I was about to search for a method for this when I saw your post. Thanks a lot, mate. :)
     
    • Thanks Thanks x 1
  8. thunderhd

    thunderhd Newbie

    Joined:
    Apr 30, 2014
    Messages:
    45
    Likes Received:
    8
    imacros will do all these thing
     
  9. SEOnetic

    SEOnetic Senior Member

    Joined:
    May 21, 2012
    Messages:
    995
    Likes Received:
    120
    nice sharing although it is an inventing the wheel. May be add some specialty that others can't provide yet.
     
  10. asap1

    asap1 Jr. VIP Jr. VIP

    Joined:
    Mar 25, 2013
    Messages:
    4,427
    Likes Received:
    2,838
    Occupation:
    Quality Control PBN
    Home Page:
    Very nice and thanks for sharing OP