Trending bar Modifications

  • Go to Appearance>>Editor>>functions.php

Trending Bar

In the functions.php file, we can place the code given below.

add_action(‘extra_trending_posts_query’,function() {
return array(
‘post_type’ => ‘post’,
‘post_status’ => ‘publish’,
‘category_name’ => ‘news’,
‘posts_per_page’ => ‘5’,
‘orderby’ => ‘date’,
‘order’ => ‘DESC’,
);
});

 

then press update file.

 

Follow the simple steps for changing the Trending Label:

  • Go to Appearance>>Editor>>header.php
  • Then search the given code below in header.php file.

In this code, we can replace the word TRENDING with LATEST. Please visit the below image for more.

Trending Label

Once we have made all the changes then we can see that the word TRENDING is replaced by RECENT POST.

Trending Label