elladesign
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: If post is a certain custom post type??Thank you Voodoo. I guess I’ll just have to do this in each templates..
thanks again for your help!
Forum: Fixing WordPress
In reply to: If post is a certain custom post type??I want to make all the pages that has the custom type “ourproducts” to add a “current” class to the link on the main nav (probably some other stuff down the road.)
So that’s why I try to check if the current post is registered with the “ourproducts” class, then do this with jquery..
I have use this function in my other templates, and it works.
$post_types=get_post_types('','names'); if (in_array('ourproducts', $post_types)){ echo 'I found ourproducts!'; }I have 4-5 templates so I don’t want to have to do 4-5 times .. that’s why I’d like to include this in the functions.php.
Is there a better way?? thank you!!
Forum: Fixing WordPress
In reply to: If post is a certain custom post type??Thank you very much for your reply. I just have add it into the functions.php as is like below… I didn’t use add_action/init or anything, should I?
I edited the code below to include global $post;, still no luck… hopefully this will show..
global $post; if ($post->post_type == 'ourproducts') { echo "<p>Yes</p>"; } else{ echo "<p>No</p>"; }Forum: Fixing WordPress
In reply to: If post is a certain custom post type??Thank you for your response but it is still return “No”
Here is the code I used to create the post type again:
[Code moderated as per the Forum Rules. Please use the pastebin]
Thank you!!
Forum: Fixing WordPress
In reply to: add_image_size doesn't work?Thank you for your reply. It works now.. Just for reasons I thought using “add_image_size” means that it’ll display another image size e.g. “category-thumb” in the UI.
Thanks!
Forum: Fixing WordPress
In reply to: Custom Post Type and has archive doesn't work?I should have said, the archive page doesn’t show any results! Please Help.
Trying to add in the code again:
[Code moderated as per the Forum Rules. Please use the pastebin]
Forum: Fixing WordPress
In reply to: Automatic assign category to a custom post typeNevermind, I have used the wrong category id :/
Everything seem to work now. But I can’t seem to add another category in the UI… how can I do that?
function add_housecategory_automatically($post_ID) {
global $wpdb;
$housecat = array (11);
wp_set_object_terms( $post_ID, $housecat, ‘category’);}
add_action(‘publish_ourproducts’, ‘add_housecategory_automatically’);Nevermind, I should have searched using “ngg_gal_Columns=4” in custom fields! thanks,
When using the plugin “nextgen-gallery” that is… Thanks.
3 Columns of photos for Gallery A and 4 Columns of photos for Gallery B,etc?
Since nobody replied, I had to use another plugin “portfolio slideshow” for the slideshow feature… I am going to set this topic to be “resolved” but it’s really not…
thanks,
It seems like I have to re-upload the images (didn’t do that earler) after this: http://sakinshrestha.com/wordpress/nextgen-gallery-plugin-and-thumbnail-generation-support/ and it worked now!
Nevermind, I just found out you can use custom fields to do that. Thanks.
I have the exact same problem!
Sorry, one thing I just noticed that if I put the [slideshow id=19] tag on a page, it will NOT work.
But when I click on “View as slideshow” link on another page with a nextGen gallery, that slideshow works!
What did I miss????