Hide author on posts on some categories and a few more issues

Posted in: Newsmag
Post count: 66

Hi! Congrats on the great template. In fact I was going to use Newspaper for my site initially —which I bought a month ago— but then I saw Newsmag and had to change my plans and buy this one too.

I am migrating my site from Joomla, and have everything set but a few things that I really need help, please:

1.- I need to hide author on post (both below title and author box) on some categories. I need most of the categories to show the author, but I need to hide it on two or three.
2.- I loved megamenu, and for it to work properly I had to group some categories in a parent category, but this way my permalink get changed, too long (I’m using the custom option /%category%/%postname%/). So, is there a way to have three or four categories on a megamenu without having to group these categories under one parent?
3.- Little white spaces between Video List and Footer, and between Block 2 (black, sidebar) and Video List –> dev site
4.- The image cropping is not working right. Images on Megamenu are being stretched instead of cropped. Is there a way to crop all images (thumbs) on the template?
5.- I customized date format on the top menu, and other format for blocks, but now I need a third format for posts. how can i do this (Post template style 2)?
6.- I need a sidebar widget (Facebook like box) to not show on screens from 768px to 1023px. And how can I center it on the column when showing?
7.- On 2-columns Slider (homepage), is it possible to not show Views and Comments? And is it possible to change the half-opaque-layer to something like this:
Example for the layer for post info.

Regards,
Felipe Z.

  • This topic was modified 11 years by felizubi. Reason: link to dev site
Post count: 6600

Hi,

1. You need to do this hardcoded as the theme doesn’t have an option for this so you need to edit the posts template file/files you use and add a condition there to show author only if is the category you want. If you don’t know how to do it I suggest to hire a developer or a freelancer to do it for you as you need custom work for this and we cannot provide any at this time because we work hard on development, updates and support.

2. Unfortunately the mega menu is designed to work using subcategories and for this changes you need custom work as well.

3. Use this custom css to remove that white space: http://screencast.com/t/K8uNc3rOTO9

.home .td-pb-row [class*="td-pb-span"] {
margin-bottom: -99999px !important;
padding-bottom: 99999px;
}

.home .td-container {
border-bottom: 0px;
}

4. The thumbs used on mega menu are created when you upload an image, you need to regenerate thumbnails: https://forum.tagdiv.com/how-to-fix-strange-thumbnails/

5. You can edit the post template 2 (single_template_2.php) file and replace the date function using this WordPress function: http://codex.wordpress.org/Function_Reference/get_the_time and get the time format you need.

6. You can use css for this but the issue appears when you try to target it to apply the css just to it as the other sidebar are also added using an text widget so you need to find a way to add a custom class which you can use to target and apply your custom css using the media snippet I’ve pasted below:

@media (min-width: 768px) and (max-width: 1023px) {
add your css code here
}

7. Use this css to hide the views and comments: http://screencast.com/t/Fuptfv3R9jBY
To have the meta section of the slider to look like in the image you need custom work.

Thanks

Post count: 66

Hi Lucian,

Thanks for answering my topic. Unfortunately the answer does not solve almost any of my problems.

I will try again:
1.- You know, especially on newspaper and magazines, there are topics that don’t need to have an author on the post credits. I had this option on Joomla (K2). This is an important feature for a magazine site. So, as there is in fact the option to show or not Author Name and Author Box, maybe is not very complex to add the option to show author by category…
2.- what a pity.
3.- Thanks!
4.- But the template stretches the images or crops them?
5.- But if I want to have the date format “l, j \d\e F \d\e Y” on single_template_2.php, how and where to add it?
6.1.- So, how to not show a widget on tablet?
6.2.- Create a custom class, “center123”. Then add it to the widget, but what code should I add on Custom CSS?
7.1.- Thanks!
7.2.- what a pity.

Regards,
Felipe Z.

Post count: 6600

Hi,

1. I will add this on our requests list and implement in future updates. Sorry for the inconvenience!
4. The images are cropped.
You can also read more about function which creates the thumbs and WordPress cropping here:
I. http://codex.wordpress.org/Function_Reference/add_image_size
II. http://www.davidtan.org/wordpress-hard-crop-vs-soft-crop-difference-comparison-example/
5.Edit single_template_2.php like this: http://screencast.com/t/XiFyFqfvW

Result: http://screencast.com/t/ITZn6dV5s3

6.1 Use the media query from below to apply your css just to the tablet screen width and also use the custom class to set hide the widget, should look something like this:

@media (min-width: 768px) and (max-width: 1023px) {
.center123 {
display: none;
}
}

6.2 I can’t access your site anymore so I can guarantee it will work but you could use this and adjust it:

.center123 {
text-align: center;
}

Hope this helps!

Thanks

Post count: 66

Excellent! Thanks for your time and help.

1.- Thanks, on my opinion it’s definitely more useful than have the option to show or not by category the Big Grid.
4.- It is weird. I used “Regenerate Thumbnails” plugin but it didn’t work on my site. I will try with the two other plugins suggested on the article.
5.- Incredible, thanks! Now, could it be possible to add “$td_mod_single” somewhere to the line of code? Because now is missing my custom font for Post elements – Date.
6.1.- “display: none” did’t work. For the homepage I added the extra class to text sidebar widget using Visual Composer, and then add the custom code to Advance CSS – iPad Portrait, but it seems VC is not adding the class to the widget. For the other pages (posts) I use a text widget adding <div class=”class123″> and it works, but the title of the widget continues to appear.
6.2.- Same result as in 6.1: using VC doesn’t work, and using “div class” it does but the widget title is not considered on the class.

–> Is there a way to use Smart Sidebar when Slider is on the same page? Or use other slider (Rev Slider, RokGallery, etc.) could be better?

(the site is accesible again on dev.elguillatun.cl)

Regards,
Felipe Z.

Post count: 62

I can help you hiding the author on specific categories, because I have this feature already implemented on my site.

I will explain you tomorrow how you can do it..

Post count: 66

Brilliant. Thanks fbengo. Ready for the explanation.

Fz

Post count: 6600

Hi,

1. Like I said, we will consider this and implement it in future updates.
4. Try it and let me know how it goes, I have also checked this and haven’t found any issues.
5. Use css to change it like this: http://screencast.com/t/8UGA2cYKt60

.meta-info {
font-family: "adobe-caslon-pro";
font-size: 18px;
}

6.1 Please use this custom css: http://screencast.com/t/skCK9Q9h

@media (min-width: 768px) and (max-width: 1023px) {
.vc_wp_text.wpb_content_element.class123{
display: none;
}
}

6.2 Looks good now: http://screencast.com/t/85f4BB4Rl

The smart sidebar should work when using the slider on the same page: http://demo.tagdiv.com/newsmag/homepage-big-slide/
Try to build you sidebar and add this custom class like I suggested here: https://forum.tagdiv.com/topic/hitting-a-roadblock-to-achieve-infinite-scrolling-with-smart-sidebar/#post-28972

Thanks

Post count: 62

In case you use child theme:

1. Open Newsmag/includes/modules/td_module_single.php and save a copy (same filename) of this file in your child theme folder: Newsmag-child/includes/modules

2. Open Newsmag-child/includes/modules/td_module_single.php and replace whole function ‘get_author(){……}’ with the following code:

http://pastebin.com/eYqQ8z8v

3. Change example categories (“CATEGORY1”, “CATEGORY2”, “CATEGORY3”, “CATEGORY3”) to post categories that shouldn’t display the author name.

4. Save file and upload file.

In case you don’t use child theme:

1. Open Newsmag/includes/modules/td_module_single.php and replace whole function ‘get_author(){……}’ with the following code:

http://pastebin.com/eYqQ8z8v

2. Change example categories (“CATEGORY1”, “CATEGORY2”, “CATEGORY3”, “CATEGORY3”) to post categories that shouldn’t display the author name.

3. Save file and upload to your main theme.

Let me know…

Post count: 66

Thank you very much fbengo! The fix works!

It only hides author below title though. It’s still missing the hiding of author post at the bottom of the post: name, description and avatar, along with “more from author”.

Regards,
Felipe Z.

Post count: 64

@fbengo I wanted to use the same Code for my Newspaper theme, but the code was not in td_module_single but in td_module_single_basel.php. Ive replaced it, but the authors still got shown on those categories. Anyone have an idea?

Post count: 6535

Hi

Please open a new thread and provide all necessary details about your issue so we can inspect it and get back to you with an accurate answer. Also consider that the code has been changed a lot in last theme updates and that’s why it may not work.

Thanks!

Viewing 12 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic.