coderdj412
Forum Replies Created
-
Forum: Hacks
In reply to: WP_Query empty when using tax_queryFor some reason I must have switched the syntax and it wasn’t an array of an array and that’s why it wasn’t working. Finally fixed it and now its working.
Forum: Hacks
In reply to: How to get two thumbnails sizes in a custom loop ?First make the size in functions. Then, whatever you named the size, use that in your theme. Then reupload the images, cause wp creates the additional sizes upon upload i believe so earlier images don’t count.
Forum: Hacks
In reply to: How to get two thumbnails sizes in a custom loop ?<?php the_post_thumbnail('small-thumb'); ?>Forum: Hacks
In reply to: How to get two thumbnails sizes in a custom loop ?I use this to create different image sizes for use on my site:
http://codex.ww.wp.xz.cn/Function_Reference/add_image_sizefunctions.php usage:
add_image_size('small-thumb', 100, 100, true);theme usage:
post_thumbnail('small-thumb'); post_thumbnail('large-thumb');Forum: Hacks
In reply to: simple = – / x calculations with 2 custom fieldsYou might have to typecast them to ints
$bmi = (int)$weight / (int)$height^2;
Forum: Hacks
In reply to: Filter: CPT and map_meta_capOk, cool. So if I set the boolean to true in the cpt function, all of the caps in the map_meta_cap inherit the caps of the post object?
For example:
If the default map_meta_cap function does this:
switch ($cap){ case 'edit_posts'If boolean is true, then the above is true for my cpt? If I create a cb func that changes who can edit posts like:
if(is_admin){ $caps = 'edit_posts'; return $caps; }If that the format to change how the caps are rendered?