Time stamp

Posted in: Newspaper
Post count: 75

Hi,
I would like to make a couple of questions for which I didn’t manage to find the respective information in the documentation:

1. I need to make a block with category tabs (AJAX filter by category) but I need to show only the posts’ title and time they were added, not the featured image.
I am attaching 2 images as examples (category-filtered-tabs-example and category-filtered-tabs-example2).
You can see them here:
http://marketpost.gr/docs/category-filtered-tabs-example.png
http://marketpost.gr/docs/category-filtered-tabs-example2.png
Don’t bother about the CSS styling of the examples. I just need to know how to show ONLY the title and the time stamp of the post.

2. About the time stamp… Can I have it next to the posts’s category everywhere, meaning home page posts, category posts, featured posts etc?
I understand that this can be accomplished with some extra PHP code in your template files but… I need it.
I would appreciate it if you could help me with that issue.

Also, I would like to ask the following, third-party, question and I would appreciate it if you could help me with that.
I need to have a ticker widget showing the stock values. I found a nice plugin: https://codecanyon.net/item/premium-stock-market-widgets/18686543
I like the ticker that shows at the end of the demo page (http://webthegap.com/products/premium-stock-market-widgets/).
However, I don’t know if it is compatible with the theme. Do have any experience on that plugin? If not, there any other, similar with that, to suggest?
This is the result I would like to have (it is a Greek website, so don’t be scared by the language): http://www.euro2day.gr/ I need the ticker just above the header, as it is showed here.

Thank you in advance for your time.
P.S. I just deleted, by accident, the date from the right of the home page, above the weather widget. I can’t find the date widget in tagDiv Composer. Is there a way to put it back?

Post count: 20688

Hi,

1. The ajax filter is available for all the blocks. You can set it in each of the block ajax section
https://www.screencast.com/t/KEz2VVzXkQlk
There are blocks that do not display a featured image thumbnail, that you can use. Like these blocks
https://demo.tagdiv.com/newspaper/block-9/
https://demo.tagdiv.com/newspaper/block-10/
The meta information you do not need to display on the modules can be disabled in the theme panel, the category tag as well
https://www.screencast.com/t/Wj1zskzjSTI
https://www.screencast.com/t/XnJUgje9b
Here you can see the available block header styles as well
https://demo.tagdiv.com/newspaper/block-header-1/

2. Each module has a structure and it displays the information accordingly in the predefined order. This is an example of a module structure
https://www.screencast.com/t/zoupp71E2G0
To display the date next to the category tag everywhere, would require modification to all the modules. Also the styling will probably need modification, for some modules.

We have not tested plugins like the exchange widget you mention. I have not seen it mentioned on the forum. The chances for it to work properly are probably the same as for any other theme. Maybe they can provide a free test version to try it out, before purchasing it.
The theme has a simple exchange widget, not that advanced however
https://demo.tagdiv.com/newspaper/exchange-widget/
Placing it above the header would require the widget shortcode to be entered in the header template file directly
https://www.screencast.com/t/sb97pLEjzbX
The date in the Business demo is custom made. It is made of a text with title element
https://www.screencast.com/t/YjCyGTfUmy
And a Raw HTML element with this code
https://www.screencast.com/t/CfjsXOYKBR

Thanks

Post count: 75

Dear Simion,
Thank you so much for your immediate and informative reply.

I managed to fix everything, following your clear instructions, but the time.
I need to show the post’s published time in module 8, prior to the post’s title.
So, I opened the file td_module_8 and I tried the following:

1.

<div class="item-details">
<?php echo get_the_time( '', $post->ID ); ?> 
   <?php echo $this->get_title();?>

2.

<div class="item-details">
<?php echo the_time('g:i a'); ?> 
   <?php echo $this->get_title();?>

3.

<div class="item-details">
<?php echo this->get_the_time(); ?> 
   <?php echo $this->get_title();?>

For 1 and 2, I get this result (I don’t even know where this time stamp comes from):
http://marketpost.gr/docs/result1and2.png

For 3, the website crashes and I get nothing below the header and the main menu (apparently, it doesn’t recognizes what $this-> refers to).

I would appreciate it very much if you could help me with this issue and, maybe, give me a hint or an example.

Since we are discussing about module 8, I have another question (may be more easy).
I would like to change the categories tabs on hover, not on click.
Also, I would like the posts to be preloaded and don’t load at the time I choose another category tab.
If I don’t ask for too much, could you help me with the jQuery to fix that?
Here is a very short video of what I am trying to achieve:
[video src="http://marketpost.gr/docs/module-8tabs-hover.mp4" /]

Thank you for everything in advance.

  • This reply was modified 8 years by lazdim. Reason: correct typo
Post count: 75

P.S I solved This one “Also, I would like the posts to be preloaded and don’t load at the time I choose another category tab.” I chose Optimized Preload at “Ajax dropdown – content preloading”.
Thank you!

Post count: 20688

Hi,

You could try something like this to display the date before the title
https://www.screencast.com/t/h1MV3CfP2
Maybe add the same class like this
https://www.screencast.com/t/EJxmducou
It also may need further styling, you can use the browser inspector to identify the elements and classes to create custom code, that can be used in the theme panel
https://forum.tagdiv.com/create-custom-code-using-the-browsers-inspector/
For the hover instead of click on the ajax filter, try making modifications here
https://www.screencast.com/t/1vC1FZeS7
Unfortunately we do not a have a dedicated theme customization department at the moment. For advanced modifications to the theme functionality, you can try to make theme yourself and test or maybe consider hiring a freelancer/developer to help you.
In some cases there are solutions posted here on the forum that you can use.

Thanks

Post count: 75

Hi Simion,
Thank you very much for your fully informative reply.
I will try your suggestions and I will post the results.

Thank you again.

Post count: 75

Dear Simion,
I managed to fix most of my requests. Here are my solutions for your record and for anyone who may need them:

1.I need to show the post’s published time in module 8, prior to the post’s title.
Open file -> Newspaper/includes/modules/td_module_8.php.
Replace the code with the following:

<?php

class td_module_8 extends td_module {

    function __construct($post) {
        //run the parrent constructor
        parent::__construct($post);
    }

    function render() {
        ob_start();
        ?>

        <div class="<?php echo $this->get_module_classes();?>">

            <div class="item-details td-module-meta-info">
                <span class="show-the-time"><?php echo get_the_time('H:i | ', $this->post->ID);?></span>
                <span><?php echo $this->get_title();?></span>

                <div class="td-module-meta-info">
                    <?php if (td_util::get_option('tds_category_module_8') == 'yes') { echo $this->get_category(); }?>
                    <?php echo $this->get_author();?>
                  <!--<?php //echo $this->get_date();?>-->
                    <?php echo $this->get_comments();?>
                </div>
            </div>

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

        </div>

        <?php return ob_get_clean();
    }
}

2.I would like to change the categories tabs on hover, not on click.
Open files -> themes/Newspaper/js/tag_div.js and tag_div_min.js
Find this line of code: jQuery('.td-subcat-item a').click( function(event) { and change it to jQuery('.td-subcat-item a').hover( function(event) {

Now, the categories will change on hover and not on click event.

Thank you for your support and don’t hesitate to ask for further information if needed.

  • This reply was modified 8 years by lazdim.
  • This reply was modified 8 years by lazdim.
  • This reply was modified 8 years by lazdim.
Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newspaper’ is closed to new topics and replies.