WordPress.org

Ready to get started?Download WordPress

Forums

Add FancyBox Class to Post Image (1 post)

  1. bk_design
    Member
    Posted 2 years ago #

    Hi,

    I am having an issue with adding a FancyBox class to the post-image/attachment and not having the image open in a separate page. In the loop-attachment.php file I added the class to this line:

    sprintf( '<a class="fancy" href="%1$s" title="%2$s">%3$s &times; %4$s</a>',

    Fancybox does work but only when I click on the image and it opens in the "attachment-page" I don't want to have to open a separate page. I want FancyBox to work right on the post/single page. Does anyone have any suggestions without using a custom field or featured image? I am also not using the FancyBox plugin, I installed it myself on the site I am building.

Topic Closed

This topic has been closed to new replies.

About this Topic