nihilistar
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Rewrite issus with Disqus PluginIs there any solution to this problem ?
Forum: Fixing WordPress
In reply to: Rewrite issus with Disqus PluginIs my rewrite rule misplaced or is it wrong ?
Thanks,
Nihilistar
Forum: Themes and Templates
In reply to: Custom post type tags/categories archive pageSolved. Show have added ‘attachment’ to
$post_type = array('post','cpt');Forum: Themes and Templates
In reply to: Custom post type tags/categories archive page$arrImages is empty when the script is activated but I don’t know why, because it’s working fine when the script is turned off. I think it’s something wrong with that link used to get all the post details and something has to be changed to work with the custom posts.
Forum: Themes and Templates
In reply to: Custom post type tags/categories archive pagefunction imaginii1($postID) { $arrImages =& get_children('post_type=attachment&post_mime_type=image&post_parent=' . $postID ); if($arrImages) { // Get array keys representing attached image numbers $arrKeys = array_keys($arrImages); $sThumbUrl = wp_get_attachment_thumb_url($arrKeys[0]); // Build the <img> string $sImgString = '<a href="' . wp_get_attachment_url($arrKeys[0]) . '">' . '<img src="' . $sThumbUrl . '" alt="" title="" />' . '</a>'; echo $sImgString; } }[Please post code snippets between backticks or use the code button.]
Forum: Themes and Templates
In reply to: Custom post type tags/categories archive pageI used the code paranoid provided and also ryansigg’s fix, but now i have another problem when displaying the posts from a category. I use a function that displays the thumbnail of every post, but with this code the thumbnail disappears. Anyone any ideas ?
Thanks