How to make this?

Posted in: Newspaper
Post count: 225

How to make this see this images

its our theme: http://postimg.org/image/mxa53kizp/

I want this: http://postimg.org/image/tz82prmlh/

Note: I can’t use any plugin to make this type post title.

  • This topic was modified 10 years by Arafat.
Post count: 100

Hey. You need to do it yourself with little customizations, or just find a plugin for it. Newspaper have its own type and looks for this thing.

  • This reply was modified 10 years by kompic.
Post count: 23312

Hi Arafat,

The easiest way to achieve this is by using a plugin. Something like: https://wordpress.org/plugins/last-updated/screenshots/
We have not tested these plugins. Some of them might not work with our theme. Try a few of them out and see how they work.

The alternative involves coding:
Use this code http://pastebin.com/vCsS4CFf

And add it to the loop-single or single_template file corresponding to your post template: http://screencast.com/t/35I4CepLEU and replace the get_date code with the one above: http://screencast.com/t/THPFMM9E
Result: http://screencast.com/t/t7sLh9Vdt
You can read more about it here: http://wpcrux.com/wordpress-last-modified-date/

Also you can use the code below to make a style for your modification

.td-module-meta-info {
display:inline-flex;
}
.the-modified-date {
padding-left:5px;
padding-right:10px;
padding-top:2px;
}
.td-post-comments {
display:none!important;
}

The result you should see here: http://screencast.com/t/SiGBizjach0v .

Hope this helps and let us know how it goes!

Thank you!

Post count: 37

@Catalin

…OR instead of creating a whole new DIV class CSS, you can just change it to <div class="td-post-date"> since there is the built-in CSS in the theme for .td-post-date class that aligns everything in place.

Post count: 80

Hello,

I use loop-single-2, I do not find get_date in it. I changed it in Loop-single, but it did not change anything on my theme.

http://prntscr.com/dmdptv

Post count: 23312

Hello pedro,

If you want to make some changes regarding on date you should edit the single_template_1.php like this -> http://screencast.com/t/VhtN8pTtxT2V

Thanks for the message!

Post count: 80

Thanks, I got it with the help of my programmer. Now, how do I make the last modified articles appear on the homepage, in spite of the last articles created?

http://prntscr.com/dmqnlo

Post count: 23312

Hello pedroarmindo1,

If you want to make some changes regarding on this page template you should edit the theme core file corresponding to this template, like this -> http://screencast.com/t/vfKQr9Ck9B3m
If you want to display more levels in our theme and if you are not aware of the steps which are needed to take in this regard, please consider hiring a freelancer/developer to help you because we cannot provide custom work at the moment, sorry!

Thanks for the message!

Post count: 73

Any planning to insert ‘show modified date feature’ in the theme itself in near future version .

Post count: 23312

Hello munvik,

In a future update, it is possible, but we cannot say for sure if it gets done in the next update because we have a big list of fixes, improvements, and suggestions to implement. It’s hard to filter them and select which one gets implemented now and which one gets postponed. The developers decide if it gets done or not, though.

Thanks for your understanding

Post count: 88

Hi ¡ well i think that show the last update on post is very important on seo my more popular post now have the first publication date and not the last update i loss a lot of keywords 🙁 please fix it. Thanks

Post count: 23312

Hello Elevas32,

In a future update it is possible but we cannot say for sure if it will get done in the next update because we have a big list of fixes, improvements and suggestions to implement. It’s hard to filter them and select which one gets implemented now and which one gets postponed. The developers decide if it gets done or not though.

Thanks for your understanding!

Post count: 76

Hi,

After last update, the code stop working :

.td-module-meta-info {
display:inline-flex;
}
.the-modified-date {
padding-left:5px;
padding-right:10px;
padding-top:2px;
}
.td-post-comments {
display:none!important;
}

Post count: 20685

Hi,


@Pierreto
The code seems to work properly if this where you want it to apply – https://www.screencast.com/t/fA4jzSRToSQ Make sure you enter all the code in Theme panel, because none of the values set in the code are present at the moment in your case. Also it is very important to clear your cache after you enter the code.

Thanks

Post count: 76

Hi Simion,

Before i added code directly on css file and i just put it on custom css and it’s ok now.

Thank’s a lot!

  • This reply was modified 9 years by Pierreto.
Post count: 48

Hi thank you but that process only changes the date to “Modified on date” on all posts whereas I need the function which could only change the date of posts which are updated later after their publish date and not every post.
e.g if a post has been updated;
if the current date is > publish date then
update the date to current date and change ‘publish on’ to ‘updated on’ current date;
The following function also does a similar thing but it doesn’t work on Newsmag theme.

function wpb_last_updated_date( $content ) {
$u_time = get_the_time(‘U’);
$u_modified_time = get_the_modified_time(‘U’);
if ($u_modified_time >= $u_time + 86400) {
$updated_date = get_the_modified_time(‘F jS, Y’);
$updated_time = get_the_modified_time(‘h:i a’);
$custom_content .= ‘<p class=”last-updated”>Last updated on ‘. $updated_date . ‘ at ‘. $updated_time .'</p>’;
}
$custom_content .= $content;
return $custom_content;
}
add_filter( ‘the_content’, ‘wpb_last_updated_date’ );

Post count: 80

Hi,

My progamer made this, but I don’t where he change on theme. I send my theme backup to your extract a code.

See my theme online: eusouandroid.co download: https://archive.org/download/backupthemenp/backupthemenp.zip

Desktop: https://prnt.sc/gk6edd
Mobile: https://prnt.sc/gk6emn

In static home page, he add this code: https://prnt.sc/gk6fcr

Send here where he modific code to help another user.

Post count: 48

Pedroarmindo1, Many thanks for your help, it really worked. I figured out that you edited the Single_template_2.php

For others, find this code in the file
<?php echo $td_mod_single->get_date(false);?>

and replace it with the following code

<?php echo the_date(false, ‘<span class=”td-post-date”>Publicado em: ‘,'</span>’); ?>
</div>
<div class=”info-line”>
<?php echo the_modified_date(false, ‘<span class=”td-post-date td-post-modified-date”>Atualizado em: ‘,'</span>’); ?>

But there is 1 more issue; if anyone could help here;
1 – Two dates are displaying in two lines. See here http://prntscr.com/gk9wd9
There should be only single date “Updated on: September 12, 2017” instead of
also displaying the ‘publish date’ and ‘updated date’

2 – Also how the date could be formatted. What CSS should be used.

Post count: 80

This is great. I don’t made this, my programer did.

You need see in mobile theme, he modific this too.

Post count: 76

Hi More,
If you have two dates, it’s because you have the two code, like you write in your post, you must replace the first code by the new one and add in custom css:

.td-module-meta-info {
display:inline-flex;
}
.the-modified-date {
padding-left:5px;
padding-right:10px;
padding-top:2px;
}
.td-post-comments {
display:none!important;
}

It’s work for me.

Good luck!

Post count: 52

Hello,

I have made few changes & got this look: https://www.blog.tutorialadvice.com/show-hn-full-stack-entrepreneur-a-full-stack-guide-to-entrepreneurship/

This is my testing website so I test all the customizations here.

Now I have few questions,

1. Will this customizations change if I update the theme? If yes how can I avoid this so I can update the theme but no customizations are lost after update.

Please let me know how to avoid this?

Thank you.

Post count: 20685

Hi,

After a theme update these modifications will be lost. The best way to make this customization would be through a child theme. The post template files can be customized with a child theme
https://forum.tagdiv.com/the-child-theme-support-tutorial/

Thanks

Post count: 52

Thanks Simon for your suggestion.

Is it possible for TagDiv to provide a child theme which has all this files already in it & structured properly so we can directly make the changes to the respective file.

If it’s possible please let me know.

Thank you.

Post count: 21

Child themes don’t work this way and with good reason. Especially for the fact in how child themes work, you would essentially be loading the same theme twice which would make loading your site extremely slow. Let me explain what I’m talking about.

With a child theme, you still need to have the parent theme (Newspaper) installed on your website… just not activated. The child theme needs to be the active theme. With the child theme active, WordPress knows that Newspaper is the parent theme and to load it first when the visitor loads your site. The child theme loads second the altered theme files after the parent theme loads.

Many users only use functions.php and style.css files in their child theme to make changes to their site. If there are other changes needed for your site that can’t be accomplished using these two files, then you need to find the file in the parent theme that needs editing, COPY it to your child theme folder (put it in the same location where it is in the parent theme… create folders if you have to), make the necessary changes to the file using your favorite code editor, and then upload it to your site using FTP.

When Newspaper updates, you will want to use a program like Diffmerge to show you the differences between the updated parent theme files and the current version of your child theme files. That way if there’s anything profoundly different, you can update your child theme files accordingly to prevent breaking something on your site.

TagDiv has resources on how to use a child theme and has a starter child theme you can download, make changes, and upload to your site. Check them out.

Post count: 52

Hey,

I hope after updating the theme to latest version the changes made using the theme panel will not change.

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