showing double dates in post detail page WordPress - wordpress

I have install WordPress 6.0 in my local system. and just open default post (Hello world),
in post showing double dates of post.
I have research for 2 hours and get a solution.

in my case I have add below code in my function.php file. ang get only one Published date
function jl_remove_post_dates() {
add_filter('the_modified_date', '__return_false');
add_filter('get_the_modified_date', '__return_false')
}
Source : https://wordpress.com/forums/topic/date-appears-two-times-after-editing-an-article/

Related

ACF : date ISO to Timestamp don't give the right minutes

I'm currently doing a website with ACF plugin. I get some data from an API (I have a json result).
In this result, I get this 2019-05-02T09:00:00Z. I need to add this into my ACF field. This is almost working thanks to the strtotime() function.
But instead of having this result : 02/05/2019 09:00, I have this one : 02/05/2019 09:05
What adjustment should I make to fix that (it's a Wordpress site, so in PHP only please) ?
Edit : my ACF function :
update_field('field_5bcce1711c3d5', $arrayParam["end"], $eventIdDB);
I've seen on forum that ACF is working with unix timestamp

qTranslate-X issue with WP post date month name in Ukrainian

I am using 3 languages: Ukrainian (default), English and Russian. The plug-in works perfectly, but the name of the month (in the date of comment or post) looks like �������. Everything else (including calendar in the widget) are translated correctly.
I have changed the text encoding in the browser to try to find out if it is the encoding issue and yes - the month's name is in KOI8-U - somehow.
Wordpress 4.9.4
qTranslate: 3.4.6.8
I found the answer which works for me:
See DaniilKZ's answer here
Here is a quote:
Add the code to the function.php:
remove_filter('get_the_time',
'qtranxf_timeFromPostForCurrentLanguage',0,3);
remove_filter('get_the_date',
'qtranxf_dateFromPostForCurrentLanguage',0,3);
remove_filter('get_the_modified_date',
'qtranxf_dateModifiedFromPostForCurrentLanguage',0,2);

Using Drupal 8: Changing blog hyperlink sentences

I'm currently using Drupal 8 blog module, however I want to change some of the English that is used.
For example, "View recent blog entries"
"USERNAME's blog"
Is it possible to change this?
Or do you know a module I can use to do this?
Many thanks,
Jake
SCREENSHOT
SOLVED:Solved
According to my understanding, There will be a blog module.Which was in the list of core modules before drupal-8 but now it has been removed.
Note: Do following changes in blog.module file (Expected Path in root director of drupal: /modules/blog/blog.module)
Search this line :
$internal_link = \Drupal::l(t('View recent blog entries'), $url);
Replace with this line :
$internal_link = \Drupal::l(t($account->getUsername().'\'s Blog'), $url);
If Unable to see changes then do clear all cache.
Output Snippet :

Can't getting same postname slug for multiple custom Post Type

I have 2 Custom Post Type(Our Works and Case Study) in a WordPress site. If I add same postname(Pepsi) at my 2 Custom Post Type(Our Works and Case Study) the permalink will show given below:
1) www.example.com/our-works/pepsi/
2) www.example.com/case-study/pepsi-2/
But It should be like:
1) www.example.com/our-works/pepsi/
2) www.example.com/case-study/pepsi/
After searching for hours... I finally figured it out. Posting this for everyone who might encounter the same issue.
I have got 2 solutions:
Install a plugin called Allow Duplicate Slugs By John
Blackbourn
Another one is Add a function to function.php

Wordpress : How to programatically return the number of plugins that need update

Is there a way to return the number that appears in the little red bubble next to "plugins" when some of them need an update ?
I'm using Wordpress 3.0.5
There's a routine in wp-admin/includes/update.php line 155 (in WP 3.0.5) called get_plugin_updates(). It returns an array of plugins with update's available. count(get_plugin_update()) should do it for you.

Resources