Articles of functions

Remove type attribute from script and style tags added by WordPress

Warning: The type attribute is unnecessary for JavaScript resources. From line 10, column 146; to line 10, column 176 feed/” /> <script type=”text/javascript”>window Warning: The type attribute for the style element is not needed and should be omitted. From line 11, column 1798; to line 11, column 1820 </script> <style type=”text/css”>img.wp Warning: The type attribute […]

How to add an export function to a custom Option Theme Page

I’m creating a new WordPress template and I have a question: I’ve added a custom Option Page to my new template (you can see what I’m doing Here and Here) but now I would like to add a new function. Do you know Si Contact Form? In this plugin the end user can download a […]

How to remove tag cloud from taxonomy admin edit page?

On the page where one adds/removes/modifies taxonomies, what would I need to add to my functions.php file to remove the tag cloud?

Modifying Custom Post Type after registration (will it affect content?)

I have a CPT (defined in functions.php) that I have set to as non-hierarchical. A lot of content has already been uploaded into the database. If I change the definition to ‘hierarchical’ => true, will the change affect any of the posts in that CPT?

Remove bulk actions based on user role or capabilities

How can I remove the “bulk actions” based on user roles or capabilities. Actually I have this code to do the job, but now I need to exclude the site admin, I need to let the administrator to access the bulk menu add_filter( ‘bulk_actions-‘ . ‘edit-post’, ‘__return_empty_array’ ); add_filter( ‘bulk_actions-‘ . ‘upload’, ‘__return_empty_array’ ); How […]

How to store functions in… functions.php?

I want to do some (sometimes really complex) stuff on my pages based on pages/posts IDs’, Settings API, etc. Now I’ve all my functions written directly within page.php file, but I don’t want it to leave it this way – it’s really messy and it’s hard to control everything. I’d love to have separate files […]

How to Display Image Meta underneath EVERY image in EVERY post

First off, I want to say thank you for taking the time to even read this, I really do appreciate the help this site and it’s community has given me thus far. i have looked forever to be able to find a way to append (display inside an added div) some image meta data just […]

Change a sidebar name?

I’m using a child theme created from a twenty-twelve theme, the theme packs a number of sidebars one which is called “Main Sidebar”. Is it possible to change it’s name to something else?

Get the 5 lastest Featured Posts from a category

Here is the website http://ariadneswonderland.gr/ that all this concerns. On the homepage I’m using a Drop shadow box plugin under the gallery to show a series of images of featured posts, as of right now, as i’m still building the website all you see is the White box under the gallery and a emoticon inside […]

2 Loops, Only Displaying 1 Loop in Both Loops

I have 2 loops, movie trailers and gaming trailers but gaming trailers is displaying under both Movie Trailers and Gaming Trailer. Each loop displays the post tagged with either Movie Trailer or Gaming Trailer. How do I get posts tagged with “Movie Trailers” under the movies area and posts tagged with “Gaming Trailers” under the […]