Articles of posts

displaying flv-video attachment in post

i’ve attached a local .flv video to my post (it was uploaded and is inside my mediapool). my question: how can i display it inside my post? (the video player) thanks

How can I add a box to edit Order on a regular post?

I’m currently using the menu_order field in the DB to have some custom ordering of posts. I want to expose this field to the user via the admin section, like it is when editing a Page (in Page Attributes). Is there a simple way to do this?

How to make the first post in the loop be styled like a “new / featured” post?

I hope i can explain this right , what im trying to do is use the default word press loop to show all my posts etc.. but for the first post I would like it to be styled completely different depending on what parent category it was published in, so there would be a lot […]

Creating separate feeds for custom post types

My site has a few custom post types, news, events, you-tube, etc. I’d like to create an rss feed for each post type as well as a main with all. I’ve experimented an bit and found how to combine them into one but I haven’t determined how to segment each. Do I need to create […]

Uploading images in custom post form

I have custom form for posting in my theme file. I also need to upload photos(videos also but photos are more important now) and I prepared form using wp handle upload function. It’s working, images are uploading but they’re not inserting into the post. Please help me. Here is a code full and here […]

my basic php code producing unexpected results

I am writing a code snippet to display attachments to a post but for each user, he should only be able to see his own attachments and not those of other users $current_user=wp_get_current_user(); //display all post attachments. see $args = array( ‘post_type’ => ‘attachment’, ‘numberposts’ => null, ‘post_status’ => null, ‘post_parent’ => $post->ID ); […]

Moving the blog page

I have done the typical procedure to change the home page to a static page, and move the posts page to a /blog page. Home page is fine, but the ‘blog’ page shows the same as the home page, even when I select a custom template which has the loop in, it just ignores that […]

Upload attachment from external site

For example, we have some image on the external site: How do I upload this image to my wordpress as an image attachment by php? Image should be copied to my uploads folder, post added, meta generated.

Isn't the way posts are displayed very unefficient?

I’m pretty much a WP newbie, and I’ve noticed that in a lot of themes, there is the exact same code for displaying posts in three different places (single.php, archive.php, index.php etc) This just bugs me. It doesn’t seem right to me, a programmer always trying to code as efficiently as possible. What is the […]

What's the safest way to switch and restore a post global?

I need to switch WordPress’s post context, sort of like switch_to_blog() but for posts. What’s the safest way to alter WordPress’s global state and switch it back?