How to display all category images for single post in a page?
get_the_category() isn’t the correct function – you should be using get_categories() per the dev documentation.
get_the_category() isn’t the correct function – you should be using get_categories() per the dev documentation.
It is really hard to say without being able to look at your theme files directly. But you are most likely going to have to put <div id=”hbz_outer_container” style=”position: relative;”> <div id=”hbz_drop_shadow”> somewhere in your header.php and then put the closing tags: </div><!– hbz_drop_shadow –> </div><!– hbz_outer_container –> in your footer.php header.php and footer.php should … Read more
Try get_terms( ‘product_cat’, ‘parent=” . get_queried_object_id() ) Update: Re-read your question, think I have a better idea: <ul class=”categories”> <?php wp_list_categories( array( “child_of’ => get_queried_object_id(), ‘taxonomy’ => ‘product_cat’, ‘title_li’ => ”, ‘depth’ => 2, ) ) ?> </ul>
function to handle to show file size i.e. paste this code in functions.php /* * @param string $fileSize Filepath * @param int $digits Digits to display * @return string|bool Size (KB, MB, GB, TB) or boolean */ function getFilesize($fileSize, $digits=2) { $sizes = array(“TB”,”GB”,”MB”,”KB”,”B”); $total = count($sizes); while ($total– && $fileSize > 1024) { $fileSize … Read more
Using the PHP strip_tags() function should clean out the unwanted HTML elements. <?php echo strip_tags( $post->post_excerpt ); ?>
Put var_dump($_SERVER[‘PHP_SELF’]); at the top of header.php and you will see the problem. That always points to index.php because nearly everything loads through index.php. Use get_permalink to get the “apparent” URL and use that instead of $_SERVER[‘PHP_SELF’] in the form action attribute.
Adding additional fields to comments isn’t hard. There are tons of decent tutorials out there (and probably prebuilt plugins too). Google it. Here’s an example: http://wp.smashingmagazine.com/2012/05/08/adding-custom-fields-in-wordpress-comment-form/ As far as I know, searching on tags + categories + comments isn’t possible. I’m confused on why you’d want to search on comments?
I see no reason why $_POST[‘delete’] should not be set assuming there are no page redirects involved. I can’t tell from your code if that is the case, but it superficially appears not to be. I do see other potential problems. You are setting your form action to an empty string. While that does sometimes … Read more
Using single.php with conditional template part inclusion for displaying a specific layout for your custom post type is not the right way to do things. WordPress has something called the Template Hierarchy. The right way would be to create a single-name-of-your-cpt.php to display single portofolio items. The same applies to custom post type archives. The … Read more
Do you need to use the Disqus plugin? ie are you synchronising with WordPress comments (own your own comments etc). If not, it’s easier and quicker to remove the plugin and just edit the comments.php file (the actual file depends on your theme but this is the most likely one). This answer has the Disqus … Read more