Articles of customization

Automatically wrap post image in div

In regards to image attachments inserted into a post, I would like to wrap the img tag inside a div tag for specific design purpose. Is there a way to do this automatically after attaching the image file, like through hooks/filters maybe? Thanks in advanced!!

Will Flutter work with WordPress 3.0?

My WordPress admin is constantly nagging me to upgrade to version 3.0. However, we use the Flutter plugin to provide all our CMS-like features. It’s a pretty great plugin, but it doesn’t seem to have been under active development lately, and I hear grumblings it’s not compatible with WP 3.0. Is anyone having luck with […]

How to deal with multiple select options using register_setting() theme options

I’m using Ian Stewart’s Sample Theme Options for a lightweight Theme Options panel. INSERTION FAILED I need to insert Multiple categories into db, where I used the following code: <select multiple=”multiple” name=”site_options[categorychoice]”> <?php $args = array( ‘orderby’ => ‘name’, ‘parent’ => 0, ‘exclude’ => 1 ); $categories = get_categories( $args ); foreach ($categories as $category) […]

How to add classes in the wp_list_category parent link

How do I add classes in the wp_list_category , I know the wp_list_categories(‘title_li=’); generates classes , but I want to add a class in the parent category link <ul> <li><a href=”#”> link1</a> </li> <li><a href=”#”>link2 </a> </li> <li><a href=”#”>link3 </a> <—how do I add a special class here <ul class=”children”> <li><a href=”#”>link3 children </a> </li> […]

Leveraging WordPress Comments on Custom Plugin Object page

I have written a plugin that creates it’s own tables to house the necessary schema for client’s product. Then I created a single page that retrieves the custom object via passed in query string like so: http://localhost/wordpress/my_object/?id=7 Where it would retrieve the item with ID 7 in it’s custom table. However the client would like […]

Display page content AFTER a loop of posts

This is probably easy once you know but I’m having trouble getting the static page content to appear AFTER a list of posts. I’m using a named page template which displays posts as a slider and I want to display the static content of the page underneath this slider. To display the static content I’ve […]

Comments Confusion

Website: [removed] If you goto the above post you will see that there are some comments which when posted appears as admin comments for some reason. If you are having problem finding that specific comment you can also press CTRL+F to find it using the following words Test Comment or Guest which i posted myself […]

Woocommerce Product page edit

I am making an online store with every category using a specific page template; that’s all done, but now, I want to edit the layout of that page template. As such, every product will have: a name, an image, a short description; I would like the product description to be between the product name and […]

How to retrieve the value stored in a multi-dimensional array and SUM the entries?

I’m trying to retrieve multidimensional values stored in user_meta where the meta key is my_posts and the meta_value is : a:3:{i:0;s:2:”23″;i:1;s:2:”20″;i:2;s:1:”9″;} Somewhere in the admin page i want to show the sum of the selected posts which are stored in the value above….

What is causing this error? “Warning: Invalid argument”

I need urgent help figuring this out please – I’ve been working on a WordPress theme locally without problems, and now that I’ve uploaded it to the live server I’m getting this error: Warning: Invalid argument supplied for foreach() in /homepages/42/d357924500/htdocs/wp-includes/post.php on line 1011 The corresponding code is related to the register_post_type function: foreach ( […]