Skip to main content
Notice removed Authoritative reference needed by CommunityBot
Bounty Ended with Unbywyd's answer chosen by CommunityBot
deleted 18 characters in body
Source Link

I want to highlight or show the new tag to the particular posts. When the user selects that the post the should be highlighted or show the new tag in the post list, the post should show new tag in the posts list in Front-end.

How I can achieve this?

The New tag means the new image or new text to highlight the post in the post list to draw user attention.

enter image description here

This is my code added in functions.php:

function wpb_lastvisit_the_title ( $title, $id ) {
 
if ( !in_the_loop() || is_singular() || get_post_type( $id ) == 'page' ) return $title;
 
// Check the post with the new tag 
$tag_ids = wp_get_post_tags($post->ID, array('fields' => 'ids'));

if ($tag_ids == 'new') 

$title .= '<span class="new-article">New</span>';
return $title;
}
 
add_filter( 'the_title', 'wpb_lastvisit_the_title', 10, 2);

CSS:

.new-article { 
background: #feffdd;
padding: 3px;
border: 1px solid #eeefd2;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
margin-left:5px;
font-size: small;
font-weight: bold;
}

Any help is much appreciated.

I want to highlight or show the new tag to the particular posts. When the user selects that the post the should be highlighted or show the new tag in the post list, the post should show new tag in the posts list in Front-end.

How I can achieve this?

The New tag means the new image or new text to highlight the post in the post list to draw user attention.

enter image description here

This is my code added in functions.php:

function wpb_lastvisit_the_title ( $title, $id ) {
 
if ( !in_the_loop() || is_singular() || get_post_type( $id ) == 'page' ) return $title;
 
// Check the post with the new tag 
$tag_ids = wp_get_post_tags($post->ID, array('fields' => 'ids'));

if ($tag_ids == 'new') 

$title .= '<span class="new-article">New</span>';
return $title;
}
 
add_filter( 'the_title', 'wpb_lastvisit_the_title', 10, 2);

CSS:

.new-article { 
background: #feffdd;
padding: 3px;
border: 1px solid #eeefd2;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
margin-left:5px;
font-size: small;
font-weight: bold;
}

Any help is much appreciated.

I want to highlight or show the new tag to the particular posts. When the user selects that the post the should be highlighted or show the new tag in the post list, the post should show new tag in the posts list in Front-end.

How I can achieve this?

The New tag means the new image or new text to highlight the post in the post list to draw user attention.

enter image description here

This is my code added in functions.php:

function wpb_lastvisit_the_title ( $title, $id ) {
 
if ( is_singular() || get_post_type( $id ) == 'page' ) return $title;
 
// Check the post with the new tag 
$tag_ids = wp_get_post_tags($post->ID, array('fields' => 'ids'));

if ($tag_ids == 'new') 

$title .= '<span class="new-article">New</span>';
return $title;
}
 
add_filter( 'the_title', 'wpb_lastvisit_the_title', 10, 2);

CSS:

.new-article { 
background: #feffdd;
padding: 3px;
border: 1px solid #eeefd2;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
margin-left:5px;
font-size: small;
font-weight: bold;
}

Any help is much appreciated.

added 473 characters in body
Source Link

I want to highlight or show the new tag to the particular posts. When the user selects that the post the should be highlighted or show the new tag in the post list, the post should show new tag in the posts list in Front-end.

How I can achieve this?

The New tag means the new image or new text to highlight the post in the post list to draw user attention.

enter image description here

This is my code added in functions.php:

function wpb_lastvisit_the_title ( $title, $id ) {
 
if ( !in_the_loop() || is_singular() || get_post_type( $id ) == 'page' ) return $title;
 
// Check the post with the new tag 
$tag_ids = wp_get_post_tags($post->ID, array('fields' => 'ids'));

if ($tag_ids == 'new') 

$title .= '<span class="new-article">New</span>';
return $title;
}
 
add_filter( 'the_title', 'wpb_lastvisit_the_title', 10, 2);

CSS:

.new-article { 
background: #feffdd;
padding: 3px;
border: 1px solid #eeefd2;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
margin-left:5px;
font-size: small;
font-weight: bold;
}

Any help is much appreciated.

I want to highlight or show the new tag to the particular posts. When the user selects that the post the should be highlighted or show the new tag in the post list, the post should show new tag in the posts list in Front-end.

How I can achieve this?

The New tag means the new image or new text to highlight the post in the post list to draw user attention.

enter image description here

Any help is much appreciated.

I want to highlight or show the new tag to the particular posts. When the user selects that the post the should be highlighted or show the new tag in the post list, the post should show new tag in the posts list in Front-end.

How I can achieve this?

The New tag means the new image or new text to highlight the post in the post list to draw user attention.

enter image description here

This is my code added in functions.php:

function wpb_lastvisit_the_title ( $title, $id ) {
 
if ( !in_the_loop() || is_singular() || get_post_type( $id ) == 'page' ) return $title;
 
// Check the post with the new tag 
$tag_ids = wp_get_post_tags($post->ID, array('fields' => 'ids'));

if ($tag_ids == 'new') 

$title .= '<span class="new-article">New</span>';
return $title;
}
 
add_filter( 'the_title', 'wpb_lastvisit_the_title', 10, 2);

CSS:

.new-article { 
background: #feffdd;
padding: 3px;
border: 1px solid #eeefd2;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
margin-left:5px;
font-size: small;
font-weight: bold;
}

Any help is much appreciated.

edited body
Source Link

I want to highlight or show the new tag to the particular posts. When the user selects that the post the should be highlighted or show the new tag in the post list, the post should show new tag in the posts list in Front-end.

How I can achieve this?

The New tag means the new image or new text to highlight the post in the post list to draw user attention.

enter image description hereenter image description here

Any help is much appreciated.

I want to highlight or show the new tag to the particular posts. When the user selects that the post the should be highlighted or show the new tag in the post list, the post should show new tag in the posts list in Front-end.

How I can achieve this?

The New tag means the new image or new text to highlight the post in the post list to draw user attention.

enter image description here

Any help is much appreciated.

I want to highlight or show the new tag to the particular posts. When the user selects that the post the should be highlighted or show the new tag in the post list, the post should show new tag in the posts list in Front-end.

How I can achieve this?

The New tag means the new image or new text to highlight the post in the post list to draw user attention.

enter image description here

Any help is much appreciated.

added 91 characters in body
Source Link
Loading
added 110 characters in body
Source Link
Loading
Notice added Authoritative reference needed by Rahul Pamnani
Bounty Started worth 50 reputation by Rahul Pamnani
Source Link
Loading