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:

passwords Tutorial
|INDEX|next: Password Tips and Tricks

Making Good Passwords

To understand what makes a good password, let's talk about what makes a bad one first.
Making good passwords can be complex, but here are some tips and tricks that will make it easier.

Password Protection

Once you've taken the trouble to make a good password, the next step is to keep it safe!
Now that you've done all this work, you have to learn the most important rule of all: DON'T GIVE THEM AWAY!

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

Bad Passwords

To understand what makes good passwords, first check out some of the worst passwords out there and what makes them so bad.

[Click for full description]

Password Tips and Tricks

It's impossible to expect someone to make good passwords by just giving them some rules. There are tricks that make your passwords secure and easy for you all at the same time.

[Click for full description]

Password Protection

It's really a skill to come up with secure passwords that you can remember. Once you've learned how, remember that it doesn't matter how good you are if you don't protect your password properly.

[Click for full description]

Password Mugging

A disturbing new practice among websites and services is where they ask you for your user name and password to other sites. I call this "Password Mugging"

[Click for full description]