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:

shopping online Tutorial
|INDEX|next: Research Products
If you like to keep your money and safe yourself the trouble and hassle of getting nailed by a bad or fraudulent retailer online, you need to learn to identify them before it's too late.
Before you buy anything, utilize the vast power of the Internet to research products and pick the best one possible.
You're about to pay for something, but what's the safest way to do it?

Related Guide

Once you've gone through the trouble to make an online account with a company, make sure you protect your passwords properly

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

Validating Webstores and Services

It can be hard to know who to trust and who to not trust online, but there are things you can do to verify who the good guys and bad guys are before it's too late.

[Click for full description]

Research Products

One of the best things about shopping online is the ability to research information online.

[Click for full description]

Paying Online

Ever been nervous about paying online for something. Just take a second to learn about the various options and put your mind at ease.

[Click for full description]