post_views_count

Posted in: Newspaper
Post count: 8

Hi i have a custom hompage with the post in some blocks but i need to show post_views_count in block like de order version, how can i do it? this is my page sabanetasr.com

Post count: 6535

Hi

By default our theme does not displays post views on modules and to achieve that you will need some changes in theme’s code. Firs you need to edit td_module.php and add this code here: http://screencast.com/t/5RdA2OQw41XGhttp://pastebin.com/u2epEiQg Next you need to edit the file corresponding with each module used on the page and add this code here: http://screencast.com/t/qHvecWYfl0 You will also need this css for layout, add it in theme panel > custom code > custom css: http://screencast.com/t/fQA3ES5q

.td_module_wrap .td-post-views{
    display: inline-block;
    margin-left: 5px;
}

Hope this helps.
Thanks!

Post count: 60

Hi,
We have done all as instructed:

td_module_2.php:

CSS:

And it breaks the site:

This is the link to the dev site: https://emprendedor.staging.wpengine.com/

Hopefully you’ll be able to see what’s wrong.
Thanks!

Post count: 22421

Hi,
Sorry but this modification must be done in the main theme. The file that needs to be modified does not work from the child theme. Only a few files from thew wp=booster folder will work from the child theme. Here is a list of files that work: https://forum.tagdiv.com/the-child-theme-support-tutorial/ – td_module.php is not among them. Sorry
Thanks.

Post count: 60

so upon the next update our changes will be gone…

Post count: 9544

As with most custom mods; yes, you need to make them to each version of theme if you upgrade theme.

Just keep list of the files ‘modded’ and then reapply the changes to new version when you do next update, prior to FTP install.

Not terribly painful; but this is the downside to “modifying” code in core files.

Post count: 1

td_module is work now but how to make it work with td_block_x.php
It’s not the same structure.

Regards, Kame

Post count: 22421

Hello,

The modification is made on the module. A block is made out of 1 or more modules. Please check this list: https://forum.tagdiv.com/theme-blocks-modules/

Thank you!

Post count: 37

how can we align it to right? thanks!

Post count: 37

oh no need, just used float:right; thanks!

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