How to append to menu items selectively
This is another case where a pure-CSS definition will work. For example: #main_nav_left li:after { content: ‘ | ‘; } #main_nav_left li:last-child:after { content: ”; }
This is another case where a pure-CSS definition will work. For example: #main_nav_left li:after { content: ‘ | ‘; } #main_nav_left li:last-child:after { content: ”; }
404’s were being caused by problem with the WP Super Cache section in my .Htaccess file. Greyed out areas AND metaboxes not showing up were being caused by WordPress suddenly having a serious issue with using capitals at the start of Custom Post Type names. Why these issues suddenly came to bite me? I have … Read more
Those setting are saved in options (see options-media.php for option names) so it is not hard to change them. However those settings are not meant to be changed by theme and I would strongly recommend against messing with them in such way. Simply put multiple files is how WP (unfortunately and so far) works with … Read more
Meta for taxononmies is not available out of the box, you need to create separate database table for Metadata API to work. If size is the only extra data you need and that is not going to change I’d try to use term description to hold it. Otherwise you are better off with CPT or … Read more
If you use the category_description filter hook you can replace the title attribute for example: function my_cat_title($category_description,$category){ return ”; } add_filter(‘category_description’,’my_cat_title’); $cat_args = array(‘orderby’ => ‘name’); $cat_args[‘title_li’] = ”; $cat_args[‘exclude_tree’] = my_cat(); wp_list_categories(apply_filters(‘widget_categories_args’, $cat_args)); remove_filter(‘category_description’,’my_cat_title’);
It’s a personal choice. If the containing markup is consistent across all templates it doesn’t matter if they’re in the template or header/footer, it’s just one less bit of markup that gets repeated in every template.
This is part of the WordPress template system, it allows you to drill down and further customize output based in the template hierarchy, for instance if you want the attachments to have separate functionality/style then your single.php, you simply create attachment.php or go even further with MIME_type.php (like images). http://codex.wordpress.org/images/1/18/Template_Hierarchy.png Also you have 4 url … Read more
Ok i can pass variables to hook but i was doing it wrong. Code should be: function encrypt_password_function($pass, $id){ global $wpdb; $encrypted=sha1($pass); $wpdb->query($wpdb->prepare(“UPDATE wp_users SET iphone_pass = %s WHERE ID = %d”,array($encrypted, ’10’))); } function encrypt_password($var1, $var2) { do_action(‘encrypt_password’,$var1, $var2); } add_action(‘encrypt_password’, ‘encrypt_password_function’, 1,2);
Unfortunately there is no filter for WP_Query args in WP_Widget_Recent_Posts class, so it’s impossible. I think there are plugins for recent post that have category filtering option – http://wordpress.org/extend/plugins/tags/recent-posts
It’s been a while since I’ve asked this, and I’ve built several themes in that timeframe. The answer I’ve come up with is “use the filter”. There is no limitation to doing this, and it makes other developers’ jobs much easier, as they only need to filter the output (vs. trying to do output buffering). … Read more