• Hi, thanks for this plugin, it’s great.

    I was wondering if it would be possible to add some kind of dynamic class to the image in the add to faves link, so that the main image could be swapped out.

    e.g. regular star image is grey, but when the post has been fave’d, it gets replaced by a gold star.

    https://wordpress.org/plugins/wp-favorite-posts/

Viewing 2 replies - 1 through 2 (of 2 total)
  • If you add the $class variable to the class in line 162, you can then style accordingly:

    $link = "<a class='wpfp-link ".$action."' href='?wpfpaction=".$action."&postid=". $post_id . "' title='". $opt ."' rel='nofollow'>". $opt ."</a>";

    Thread Starter aljuk

    (@aljuk)

    Thanks Jesse, almost but not quite…

    It’s the image (star) I’m trying to swap out (not governed by the link styling).

    I’ve tried a bunch of things in wp-favorite-posts.php, but I’m not quite there yet…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Feature request – dynamic image class’ is closed to new replies.