images in wordpress themes

Its never a good idea to store binary data in your database, take a look at this post: https://stackoverflow.com/questions/662488/would-you-store-binary-data-in-database-or-in-file-system and this post: https://stackoverflow.com/questions/5778380/why-store-binary-data-in-mysql In my opinion, its far faster to use the file system and here’s why: The image URL can be stored in a custom field by wordpress – this is very simple to … Read more

if is_home(), change class of menu-item-225 of wp_nav_menu

Rather than adding a class, just add a second selector to your .current_menu_item style of .home .menu-item-225. Not ideal, but for a single case, I think it’s completely appropriate. (This assumes that you’re using body_class() on your <body> element, but you should be doing that anyway.)

PHP Widget and do_shortcode

The problem was the double quotes which are needed in normal shortcode usage in posts and pages for some reason when using do_shortcode the double quotes in the attributes where breaking the function. Working code below <div> <?php $lat = get_field(‘woo_maps_lat’); $long = get_field(‘woo_maps_long’); echo do_shortcode(‘[forecast location=’ . $lat .’,’.$long. ‘]’); ?> </div>

wordpress taxonomy in regular posts

Yes, setting the $object_type, the second argument in the register_taxonomy function, set the value to an array including your custom post type slug and post. register_taxonomy($taxonomy, array(‘post’,’your-custom-post-type-slug’), $args); Review: http://codex.wordpress.org/Function_Reference/register_taxonomy Also check out my plugin http://wordpress.org/extend/plugins/reed-write/. It makes custom post types and custom taxonomies a breeze.

update_post_meta not working

You are most likely not assigning the right page template. Make sure your template name is the same case as the file in your theme directory. Also make sure the file name you provide as the template actually exists in the theme directory otherwise it will be marked as the Default page template.

How to remove parent section in an attachment URL in wordpress?

You can add a filter to the function that gets attachment links to force that format: function wpa60888_attachment_link( $link, $id ){ return home_url() . ‘/?attachment_id=’ . $id; } add_filter( ‘attachment_link’, ‘wpa60888_attachment_link’, 10, 2 ); Calls to get_attachment_link will have this filter applied to the output.

Get unique post in parent category

you can easily find solutions for this by using google. — edit with solution for duplicates — to filter out your duplicates fill an array with the ids. then check if the post is in the array if not print it , otherwise skip it. you said you have solution for getting the posts so … Read more