- This topic has 2 replies, 1 voice, and was last updated 10 years, 10 months ago by .
Viewing 3 posts – 1 through 3 (of 3 total)
Viewing 3 posts – 1 through 3 (of 3 total)
Posted
by
Forums › Forums › Search & Filter Pro › Php code to show Product Categories
Hi,
I purchased the plugin and I am trying to show the product Category above the Product Name. I am using this code:
” rel=”bookmark” title=”<?php the_title_attribute(); ?>”><?php the_category(); ?>
But it is not displaying the categories. This is the page I am working on:
https://thesourceimports.com/advanced-search/
Also, for the thumbnail images, I am using this code:
<?php
if ( has_post_thumbnail() ) {
echo ‘<a href=”‘;
the_permalink();
echo ‘” rel=”bookmark” title=””>’;
echo ‘‘;
the_post_thumbnail(“”);
echo ‘‘;
}
?>
I need to add <?php the_title_attribute(); ?> inside the title””, but when I do this it doesn’t work:
title=”<?php the_title_attribute(); ?>
Any help would be greatly appreciated.
Thanks!
Andrea
Sorry, the code for the category that I am using got cut out. It is this: ” rel=”bookmark” title=”<?php the_title_attribute(); ?>”><?php the_category(); ?>
Thanks!
Andrea