Questions about Block 13

Posted in: Newsmag
Post count: 13

Hi!

I have 2 questions about Block 13:

1. Is it possible to show the post view count in the details, near the date? How can I do that?

2. How can I add a ‘Read More’ button, underneath the content excerpt? (something similar to Block 13 –on 2 columns from the NewsPaper theme)

Thanks in advance!

Post count: 6535

Hi

1. Try this css in theme panel > custom css: http://screencast.com/t/ANcl5HZ5Ha

.td_block_13 .td-module-comments{
display: inline-block;
margin-left: 10px;
float: none;
}

2. To add Read More button you need to edit td_module_14.php file and add this code like here: http://screencast.com/t/xBI2Pdqp5FS

<div class="td-read-more">
   <a href="<?php echo $this->href;?>"><?php echo __td('Read more', TD_THEME_NAME);?></a>
</div>

Then add this custom css in theme panel > custom css: http://screencast.com/t/RFjn3Gwjv

.td_module_14 .td-read-more {
    display: block;
    margin: 0 15px 20px;
}
.td_module_14 .td-excerpt{
    padding: 12px 20px 20px 20px;
}

Note that this changes will be applied every time when module 14 is used.

Thanks!

  • This reply was modified 10 years by Andrei L..
  • This reply was modified 10 years by Andrei L..
  • This reply was modified 10 years by Andrei L..
Post count: 13

Hi Andrei,

Thank you for your help.

1. I think you showed me the solution to a different problem 🙂 I wanted to add the post view count in the details, not the number of comments. Can you show me how to do that?

2. I’ve added the ‘Read More’ button without any problems 🙂 Thanks

and a new one:

3. Is it possible to integrate social share buttons (Facebook and Twitter), into the same post details area, underneath the author/date/post views?

Post count: 6535

Hi

1. Sorry for misunderstanding you. The theme wasn’t designed to display the post views on modules but you can achieve that adding this code http://pastebin.com/JdFgK89X in td_module.php like here: http://screencast.com/t/BjVvJT9m Then you need to edit td_module_14.php file and add this line of code like here: http://screencast.com/t/o5t83VOzFaeM

<?php echo $this->get_modules_views();?>

The result should be like here: http://screencast.com/t/SVLgrtzl Note that this changes will be applied every time when module 14 is used on pages.

3. The social sharing buttons wasn’t designed to be displayed on modules, you will need custom modification in to achieve that. Unfortunately I can’t provide a quick solution, so if you need this and you’re not aware of the steps you need to take in this regard please consider hiring a developer or a freelancer from sites like http://studio.envato.com/ to do this for you.

Thanks!

  • This reply was modified 10 years by Andrei L..
Post count: 13

Hi, Andrei

Thanks for the solution, it worked perfectly.

I really like the customization capabilities of Newsmag 😉

On that note, now my block 13 displays the category tag, date and post views. The category tag is black by default (for all the modules/blocks).

1. Is there a way to customize the color of the category tag?

2. How about to color-code the categories, I have only 3 categories and displaying them in different colors would look really awesome? Is that possible?

3. What will happen to all of the changes to code( that I’ve applied so far) when I update the theme?
What can I do to make sure I don’t loose any of my current modifications and yet update the theme?

About the Social Share buttons: They are beautifully designed and work perfectly (the visual) with any of the post templates. It would make an awesome feature to be able to fit them in the details of each post, on at least some of the modules. Please put that in the ‘Future updates Wishlist’ 🙂 I am sure many customers will appreciate that!

Post count: 6535

Hi

1. Try this custom css to change the category tag color: http://screencast.com/t/durWDli6

.td-post-category{
background-color: red;
}

2. You can customize the category page individually for each category from theme panel > categories: http://screencast.com/t/MfHsmVqWbc If this is not what you mean please provide more details so I can provide a more accurate answer.

3. When you update the theme the old files are rewritten by the new ones so this customizations will be lost, except the css from theme panel. You need re-add the changes in the indicated files after update.

Thanks!

  • This reply was modified 10 years by Andrei L..
Post count: 13

I meant that in my Block 13, I display 3 different categories. I would like each post category tag, within Block 13, to have a different color, depending on the category it represents (so I’d have 3 different color possibilities per total). i.e. category1 -> red, category2 -> green, category3 -> blue

From what I am seeing, the customization of categories from Theme Pannel>Categories can only attribute different colors to category tags for the post pages, whereas I am looking for a way to do that on a page and within a specific block.
Is that possible?

Thanks again for your answers.

*BTW, I have found this thread on the topic of displaying Social Share buttons on posts in a page https://forum.tagdiv.com/topic/can-i-edit-block3/ but it refers to Newspaper. It seems that that request was solved but the provided solution links are outdated…

Post count: 6535

Hi

The category tags displayed in a block can’t have different colors as they have the same css class and can’t be targeted individually. To achieve that it’s needed a function which generate a unique id for the category tag then use that id witin a css class to change the color. This is a complex task and I can’t provide a quick solution now. If you need this my advice is to look for a developer from sites like http://studio.envato.com/ if you don’t know how to do it yourself.

The indicated solution works. To add the social sharing buttons in block 13 just paste this code: http://pastebin.com/Pjjxr6bn here: http://screencast.com/t/e4vydIC9Bvsm ten add this css in theme panel: http://screencast.com/t/VP7kQst0ytB2

.td-social-but-text{
top: 0;
}

Thanks!

Post count: 13

Hi Andrei,

About the category tags: OK, thanks for explaining 🙂

About the Social Share buttons: I’ve tried the solution suggested and it looks ok in the post details.
But when I view a post, on the post page the social buttons look distorted. The added code somehow affects the way the social buttons are displayed in the post page.
How do I fix that?

Also, the added social buttons in the post details are share buttons. They work, but upon enabling them, how can I control what is shared? The buttons are supposed to share a link to the post (since they are located in the post details, of many posts in Block 13). Instead they share a link to the page on which Block 13 is used. That defeats the purpose of the buttons. So my question is: How to control what links are shared?
Thanks again!

Post count: 6535

Hi

Sorry about that.
Replace the previous css with this one, I’ve targeted only the pages:

.page .td-social-but-text{
top: 0;
}

The try this code, it should work fine: http://pastebin.com/YaVCTvbqhttp://screencast.com/t/XKkivpIdOFGi
Please note that the theme doesn’t control the shared information, you will need a plugin to do that.

Thanks!

Post count: 13

Can you please suggest a plugin that would do that?

Post count: 6535

Hi

We didn’t tested any plugin with a similar functionality so I can’t make a recommendation in this regard but you can try with SEO BY Yoast or another plugin which allow you to manage OG data.

Thanks!

Post count: 13

Thanks and nevermind about the plugin, I understand now what you mean. I use Yoast to control the post titles and descriptions for shares.

The code worked only for the facebook part 🙂
I changed (a bit) the twitter part and now it also works as intended. (It used to share the actual post ID rather than the title of the post, and it linked back to the page not the post.)

About the way the Facebook and Twitter buttons look. I want the text to be bold and non-italic, so that it wouldn’t look weird next to the category tag. But I am not sure where to change that. Please help.

Post count: 6535

Hi

To make the text bold you you need to include it between tag like here: http://screencast.com/t/4Ln4Alr0 and the font style can be controlled with css: http://screencast.com/t/eV8jjvupuYe

.page .td-social-but-text{
font-style: normal;
}

Thanks!

Post count: 13

Thank you, Andrei!

Post count: 4

@post #74641
Hi,
I wanted to add the read more button to block 11. Can I use this same process? Which td_module do I have to modify?

Post count: 6535

Hi

To add read more or block 11 you have to edit td_module_10.php file like here: http://screencast.com/t/njpr9mQSIhttp://screencast.com/t/IM6rdJr6

Thanks!

Post count: 4

Thanks a lot for your help

Viewing 18 posts - 1 through 18 (of 18 total)
The forum ‘Newsmag’ is closed to new topics and replies.