Hello sir, I want to show category name in homepage bellow post title similar to like http://www.onwpthemes.com.
And if any way to show full thumb on hover similar like http://www.onwpthemes.com please suggest me.
-
This topic was modified 12 years by
Abhay Pratap.
hi,
identify what module are you using : http://screencast.com/t/tvb3Z9oD2
i use module 5 as example:
then: http://screencast.com/t/W0oLu4piTx
if there are more then 1 category is because the the post is either in a subcategory, or the post belongs to multiple category.
Thanks for you message.
Radu A.
Thanks for your reply.
I am using module 6 in site http://www.bestwp.org. and i want to make it same as http://www.onwpthemes.com
I want to display only single category (which we select as a primary category in post setting) name bellow title.
And How Can we dispay 3 posts in one raw in module 6 with sidebar in catgory pages.
And if any option to display full uploaded image in thumb hover, Please suggest.
Hi,
Add this code
<?php echo $this->get_category(); ?>
function get_category() {
$buffy = '';
//read the post meta to get the custom primary category
$td_post_theme_settings = get_post_meta($this->post->ID, 'td_post_theme_settings', true);
if (!empty($td_post_theme_settings['td_primary_cat'])) {
//we have a custom category selected
$selected_category_obj = get_category($td_post_theme_settings['td_primary_cat']);
} else {
//get one auto
$categories = get_the_category($this->post->ID);
if (!empty($categories[0])) {
if ($categories[0]->name === TD_FEATURED_CAT and !empty($categories[1])) {
$selected_category_obj = $categories[1];
} else {
$selected_category_obj = $categories[0];
}
}
}
if (!empty($selected_category_obj)) { //@todo catch error here
$buffy .= '<a href="' . get_category_link($selected_category_obj->cat_ID) . '">' . $selected_category_obj->name . '</a>' ;
}
//return print_r($post, true);
return $buffy;
}
like here: http://screencast.com/t/vDIQvlIHuyYb
For full thumb add this: add_image_size('thumb-full', 326, 0, true); in function.php like here: http://screencast.com/t/X9zw07pJOICP
Then edit like here: thumb-full http://screencast.com/t/6q2KQ8r2E
Then regenerate your thumbnails following steps from here: https://forum.tagdiv.com/using-the-theme-with-existing-content/
Thanks!
Thanks for your support to show category.
But in full post thumbnail, i don’t want to display full post image. when we hover mouse on image then thumb show full image.
And How we can display 3 post in one raw(default is 2) in module 6 with sidebar.
Hi,
I don’t understand your question, sorry, can you be more specific, show me in a screenshot or something.
For the loop is used a general layout builder and will be on all modules(loop) if you change this.
Change like here:
1. http://screencast.com/t/CNni9IVMB
2. http://screencast.com/t/jk2hpONCOdI
Thanks!
Hi Marius.
Please see screenshot http://i.imgur.com/sKl3LP6.png.
In the site http://www.wpthemesdigest.com/ when we hover mouse in any post thumbnail then full image displaying.
And in the module 6 we able to display category name. can you help one thing also when we open any category like http://www.bestwp.org/category/premium-themes/business/ then bellow post category name will change to by author name.
Hi,
Do you want to have the full image when hover the mouse? That is custom and only if you achieve that with a plugin if exist.
Go to module_6 and uncomment this line if you want to show the author name: http://screencast.com/t/Zz3388CI
After The theme update these editing not work. I tryied child theme also but not working. In New theme i have edited files but not theme not work properly after editing.
Hi Marius,
This post took me here.
I apply the code that you gave and work perfectly in my module 6.
However I would like to put the categories above the title with the same style they have when I open the articles (boxed colors) like this:

I also like to show only the categories of a specific parent category, it’s possible?
Thanks
-
This reply was modified 12 years by
Pjump.
Hi,
In td_module_6.php file move the <?php echo $this->get_category(); ?> line and add this class ' . 'class="custom_category" like here: http://screencast.com/t/xxqdUyITv
After doing that please add this custom CSS in Theme Panel > Custom CSS:
.custom_category{
line-height: 15px;
display: inline-block;
padding: 2px 8px 3px 8px;
margin-bottom: 4px;
color: white;
background-color: #c85bcd;
font-size: 12px;
}
Change the font/background/color.. as you like.
Regarding the category it’s not an easy task to do, you can hire an freelancer if you want to have something like that as we can’t offer custom work.
Hope this helps!
Thanks
Hi again,
Thanks for the information.
Meanwhile I’ve found the functionality that I want. In the new version of Newspapper is possible select the primary category that I want to show. I just simply add the code above to the blocks where I want to show this one category, the other categories will be ignored in the front page. Perfect.
Thanks