Inserting image into post content – Front End

The content of the post is just that – the value of post_content field. You could retrieve HTML for attachment by wp_get_attachment_image() and either pass it to wp_insert_post() initially (will need to create attachment earlier for that) or use wp_update_post() to assign content to already existing post.

How to use in_category?

It looks like you’re mixing the WordPress in_category() function with plugin / theme code that isn’t setting up a standard WP Query or post object. So you can’t use in_category(). Use var_dump($content); and var_dump($data); to see if either of those objects have a ‘category’ property for the content. Use that in an if statement instead, … Read more

Show a Category Specific Info Box

There are multiple ways to print content on the front end. The “best” way depends on the details of the project and your description is very superficial. The option I can think of are: Just edit the appropriate theme template to use has_category to display your links to the category URLs Do the same as … Read more

How to mix pages and sub-categories in a url

I don’t think so. Why not try something like this: A permalink structure like this: /%category%/%postname%/ Category: Windows Sub-Category: Serenity Create a post and assign it to “Serenity” (sub-category), and publish it. The post’s URL would now look just the way you want it to: http://site.com/windows/serenity/post-name/ and most importantly it should work the way you … Read more