Yes, it's THAT book!

Drop your email here to stay informed of the status of my "tell most" book about the National Security Agency:

--OR--

Read a little about the book here:

Employees are allies, not the adversary

--OR--

Check out the Kickstarter here (click)
How can I help you?
Contact Jeremy
Recommendations

Here's something that


I, Jeremy Duffy, actually recommend and think is worth checking out.
No web-bugs, no bs, just a legit recommmendation that I have personally evaluated before allowing it to be listed here:

Think something's here that shouldn't be? contact me!

Manually Insert Page/Post Into WordPress Via PHP

When I wrote a page to automatically process photos into individual posts using WordPress to make a gallery, I ran into the problem of manually creating a post and having it set the category. I solved the problem and at least one person has mentioned that they’d like to see how it’s done so here it is:

// for force creating posts
class poster {
     var $post_title;
     var $post_content;
     var $post_category;
     var $post_status;
     var $post_author;
     var $post_name;
}
$a_post = new poster();
$a_post->post_title = “Title of the post.”;
$a_post->post_content = “Here’s where your content goes”;
// An array of category ids. Note that this failed for me when the category wasn’t created ahead of time
$a_post->post_category = array(1,7);
// Or private or draft or whatever
$a_post->post_status = “publish”;
// I’m author 1. You probably are too, but set this to whatever you want.
$a_post->post_author = 1;
//This should probably be based on some variable or function, but I’ll hard-code it for this example
$a_post->post_name = “smithy”;
     
// feed object to wp_insert_post
$post_id = wp_insert_post($a_post);     


Share This

Have a Comment or Question?

Loading...

If you want to learn more about my professional background, click here to learn more.

Check out one of my guides/tutorials:

data defense Tutorial
|INDEX|next: Protecting Social Security Numbers
It's impossible to fully prevent credit card fraud, but there are several things you can do to help.
Social security numbers have become the gateway to all kinds of identity abuses so the less people you give it to, the better.
Your data is as valuable as money so protect it like money!
What do you do once your data is already out there? This.

... or check out any of my other guides and tutorials by clicking here!

Protecting Credit Cards

Credit card fraud isn't ID Theft, but is closely relatedare often used fraudulently so do what you can to prevent it.

[Click for full description]

Protecting Social Security Numbers

Social security numbers have become the gateway to all kinds of identity abuses so the less people you give it to, the better.

[Click for full description]

Being a Data Scrooge

Learn to protect your personal information the way Scrooge did his money.

[Click for full description]

Reputation Management

Just because there are things out there about you that are out of your control and are unflattering or worse, doesn't mean you're powerless.

[Click for full description]