0

i am developing a plugin where i need that on each post title a small icon added next to post title.
my code is below. it is adding icon but i need both seperately clickable.(both icon and title is pointing to same url action).

add_filter( 'the_title', 'modified_post_title');
function modified_post_title ($title) {
  if ( in_the_loop() && !is_page() ) {
    $title = $title." <img src='".URL."/images/yellow.png' class='AtF'>";
  }
  return $title;
}

Any suggestion appre.
thnx

2
Contributors
2
Replies
16
Views
3 Years
Discussion Span
Last Post by mangel.murti
0

Your function sends the tilte to the theme.
The theme add the link (or not)
frorm the defalt 2013 theme:
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>

0

i am not getting you. how can i adjust above link code to plugin function which i already mention above. acctuly.. my goal is to fire ajax whenever a user click on yellow.jpg icon. plz see attached file.

Attachments issue.JPG 29.46 KB
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.