Hello,
I noticed that the function “$this->get_date()” returns a lot of CSS and HTML like this:
“<span class=”td-post-date”><time class=”entry-date updated td-module-date” datetime=”2018-12-14T17:33:41+00:00″ >14th Dec. 2018 @ 05:33 pm</time></span>”
which made the function strtotime( $this->get_date() ) fail.
The Solution.
Using the function “get_the_time(‘U’, $this->post->ID)”, I was able to get the timestamp of the post and using the code below, i was able to achieve the question I asked.
<?php echo ( get_the_time(‘U’, $this->post->ID) > strtotime( “5 days ago” ))? human_time_diff( get_the_time(‘U’, $this->post->ID), current_time(‘timestamp’) ). ‘ ago’ : $this->get_date(); ?>
for post less than 5 days ago, it will display the “ago”, while if the post is more than 5 days ago, it will display the date
Try and see if it works for you.
I think the default is kinda bland. Is the best way using CSS?
Thanks for the infos.
My goal is to create a custom format. I want to be able to apply a specific css to a any text in the content post. The same kind of custom format as you have to highlight a text.
> Is it possible to use td api block for that ?
Thanks very much
Hi,
Just add the custom css and all buttons for next/prex will change to purple
https://www.screencast.com/t/xRheoc8Gev
.td-next-prev-wrap a {
border: 1px solid #5555ff;
color: #5555ff;
}
Thank you.
-
This reply was modified 7 years by
Calin.
Hi,
Usually that happens on specific pages, something in the page content could be causing it. Does it happen on all pages, even new ones?
We could take a look at it, send us an email at contact@tagdiv.com and provide admin login. Mention the page or pages with the problem.
Regrading the CSS, the theme has advanced CSS sections, so you can enter code without media queries in the desired fields
– https://www.screencast.com/t/7rtoiob9
In case you use the mobile theme plugin CSS code has to be entered in the mobile theme section
– https://www.screencast.com/t/3xM0S0qyu2
If you tried it like this, mention in the email what exactly you want to do.
Please include a link to this topic in the email.
Thanks
Hi,
That was just an example, you need to set the image width and height in order to get a round image
https://www.screencast.com/t/kpT3xVBV7
https://www.screencast.com/t/9wK13QAm9f
The below custom css will make a round image from each image that have the the same height as witdh.
Thank you.
-
This reply was modified 7 years by
Calin.
Hello,
I know that Google Page Insights is not a perfect tool to measure the page speed. But I have a big difference between the mobile and the desktop version:
Mobile Version 19% (https://picload.org/view/dccggriw/bildschirmfoto2018-12-14um13.0.png.html)
Desktop-Version 76% (https://picload.org/view/dccggrip/bildschirmfoto2018-12-14um13.0.png.html)
Has anyone a tipp about the reason of that?
Here is my configuration:
Ubuntu, 16 GB Ram, SSD
PHP 7.2.13
Newsmag 4.7
post_max_size = 50M
max_execution_time = 300
max_input_vars = 3000
SUHOSIN installed = false
mbstring = available
GD library = available
WP version = 4.9.8
WP multisite enabled = no
WP Memory Limit = 512 MB/request
FPM-Application about Nginx 1.14.1
pm.max_children = 100
Nginx configuration (instead of htaccess)
if (!-e $request_filename){
rewrite ^(.*)$ /index.php break;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires 30d;
add_header Pragma public;
add_header Cache-Control "public";
try_files $uri @fallback;
}
# Block XMLRPC
location = /xmlrpc.php {
deny all;
access_log off;
log_not_found off;
return 444;
}
# Fix for chinese icons
location ~* \.(eot|ttf|woff|woff2)$ {
add_header Access-Control-Allow-Origin *;
}
# GZIP compression
gzip on;
gzip_proxied any;
gzip_types text/plain text/xml text/css application/x-javascript;
gzip_vary on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
WP-Rocket
Caching for mobile devices = enabled
HTML minimize = enabled
Remove static query-strings = enabled
css minimize = enabled
javascript minimize = enabled
load javascript delayed = enabled
lazy loading for pictures = enabled
lazy loading for iframes and videos = enabled
deactivate emojis = enabled
deactivate wordpress embeds = enabled
activate preloading = enabled
heartbeat control = reduced activity
Hello
When i use TagDiv Composer in order to change some specs this error appears(Error at rows: 7(models) : 0(dom). The model does not match the content) and also i used @media css and is not working on the mobile. Please advise.
Thanks
Hi,
I’ve got newspaper theme runing on a fresh wordpress instalation.. All done as per documentation, however several demo home pages are loading with broken css stylesheet. Including the Hello World home page.
Regards
Luiz
Thanks Calin.
Another question: I successfully changed the color of the prev/next arrows in the trending news section, as you can see here with the purple outline: https://ibb.co/xDP4vMG
However, when trying to replicate the same thing on the next/prev arrows at the bottom of a block, I can’t seem to be able to change the outline and make it purple. All I can do is having the button purple when the mouse is on top of it, but the outline remains grey and very difficult for users to spot: https://ibb.co/RTF6WDH
Do you have to dig into the css file or is there any setting I can easily change in the tagdiv interface?
Thanks again.
Hi,
A code like this should do that when not using the mobile theme plugin
– https://www.screencast.com/t/Bfj98RF8
#td-header-menu #td-top-mobile-toggle {
position: absolute;
right: 0;
}
.td-header-main-menu .header-search-wrap {
right: auto;
}
be sure to enter this in the Advanced CSS phones section.
Or like this when using the mobile theme – https://www.screencast.com/t/jRGckQ2wKugx
#td-header-menu #td-top-mobile-toggle {
position: absolute;
right: 0;
}
.td-header-wrap .td-search-icon {
right: auto;
}
Thanks
Hi,
Please check your settings, because your active color is set to transparent
https://www.screencast.com/t/2m1vV0WmZ
https://www.screencast.com/t/q4DYmduz
If you can manage the problem please add thsi custom css in Newspaper>Theme panel>Custom code>Custom css
.td-gadgets .td-header-style-5 .sf-menu>.current-menu-item>a {
background-color: red;
}
You can change the background color.
Thank you.
Hi,
You could enter the newsletter code in the header ad spot, in the theme panel
– https://www.screencast.com/t/Ndq01Yzz
It may require additional CSS, since that spot is not designed to display newsletters. Those would usually be in the content of pages/posts.
Other than that, it could be done only by entering the form code in the header template files directly according to template used
– https://www.screencast.com/t/SCFzqTEp
Thanks
Hi,
I think you are using safari, please replace the below custom css with this one
.td-module-thumb, .td-image-wrap, .entry-thumb {
border-radius: 10px;
-webkit-mask-image: -webkit-radial-gradient(white, black);
}
Hope this will solve your problem
-
This reply was modified 7 years by
Calin.
Hello, I am currently using the newspaper theme. Recently our site has been running really slow and unstable, we could no longer access css from within the theme panel or wordpress css from within the admin and some more issues as well. So we set up a new wordpress website with Google cloud hosting.
I have 2 questions
1.) which database table/s are specific to the newspaper theme/blocks etc?
2.) I can not access the export file in theme panel because my cursor does not highlight the code to export when I click within the export settings theme box with the code. Has anyone else ever had this issue? Or is there any other place I can access the code to import into my new theme installation?
thanks
– Sean
I use Mobile theme so I add the code in Custom code CSS section but the counter continues to show up đ
Hi,
Please add this custom css ( this custom css will border all blocks/modules that you have on your website )
.td-module-thumb, .td-image-wrap, .entry-thumb {
border-radius: 10px;
}
Let me know the results.
Hi,
All the block quotes settings might be changed from here -> https://forum.tagdiv.com/newsmag-post-formats-for-tinymce/ Also, if you want to make some major changes over this element, you need to do it yourself through the code, custom CSS.
Thanks for your understanding!
Hi,
So you want to hide the views only on mobile. I could give you a code for this
.td-post-views {
display: none;
}
If you don’t use the mobile theme plugin, enter it in Theme panel->Custom code->Advanced CSS section in the phones field.
If you use the mobile theme plugin, enter it in Theme panel->Mobile theme->Custom code CSS section.
Thanks
Hi,
In order to achieve a round picture you’ll need to add a class on picture/image, and a custom css in Newspaper>Theme panel>Custom code>Custom css
.round-img{
border-radius: 50%;
}
You can change the number percent
Here is an example
https://www.screencast.com/t/kpXR7dCePvm5
https://www.screencast.com/t/vaTvrfwcrug
Results -> https://www.screencast.com/t/yO4ozKm5sn
In order to have a shop on your website you’ll need woocommerce plugin -> https://wordpress.org/plugins/woocommerce/
-> https://www.youtube.com/watch?v=L5sWnh3EkTI
Hope this will help you.
Thanks.
Thanks for your answer.
I thought about an other solution and would like to have your opinion.
What do you think about using an existing td theme custom format and changing the css related. Meaning I would use an existing custom format that would not be changed on the updates… the only difference is that the name of the custom format would be something like PinK Block etc…
What do you think ?
i have increased header with and footer with to 1200 container. How to increased content section also to 1200px; . i have tried to increase same using css but big 3 grid not increase. You can check the link check my website link: http://floralsngifts.com/new
Ok Calin, i remove all css
Hi,
Please remove all css from theme panel, that you get for the border radius and let try to make a new css, nice and clean, please let me know when you remove the css, to can provide you a new one.
Thank you for your underrating.