Title: Need help using this plugin on posts featured images
Last modified: September 19, 2017

---

# Need help using this plugin on posts featured images

 *  Resolved [csandreas1](https://wordpress.org/support/users/csandreas1/)
 * (@csandreas1)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/)
 * i want to activate the zoom function on featured images on the posts only. How
   can i do this? I am using tyche theme.
    -  This topic was modified 8 years, 8 months ago by [csandreas1](https://wordpress.org/support/users/csandreas1/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fneed-help-using-this-plugin-on-posts%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/page/2/?output_format=md)

 *  Plugin Author [cubecolour](https://wordpress.org/support/users/numeeja/)
 * (@numeeja)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/#post-9511303)
 * Make a backup of your template’s single post template then edit it to replace
   the the code that calls the featured image, using instead the code listed in 
   the plugin’s faq to call the zoomable image:
 *     ```
       if ( function_exists('cc_zoom_featured_image') ) {
               cc_zoom_featured_image();
           }
       ```
   
 *  Thread Starter [csandreas1](https://wordpress.org/support/users/csandreas1/)
 * (@csandreas1)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/#post-9511320)
 * What is the default wordpress code that calls featured image?
    -  This reply was modified 8 years, 8 months ago by [csandreas1](https://wordpress.org/support/users/csandreas1/).
 *  Plugin Author [cubecolour](https://wordpress.org/support/users/numeeja/)
 * (@numeeja)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/#post-9511998)
 * `the_post_thumbnail();`
 *  Thread Starter [csandreas1](https://wordpress.org/support/users/csandreas1/)
 * (@csandreas1)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/#post-9512513)
 * I have searched for `the_post_thumbnail();` with AstroGep but it only found that
   in wordpress default themes and not tyche theme. By investigating [tyche theme](https://colorlib.com/wp/themes/tyche/)
   i have found inside **class-tyche.php** file the following that has to do with
   post.
 * `add_image_size( 'tyche-blog-post-image', '730', '435', true );`
 * and
    `add_theme_support( 'post-thumbnails' );`
    -  This reply was modified 8 years, 8 months ago by [csandreas1](https://wordpress.org/support/users/csandreas1/).
    -  This reply was modified 8 years, 8 months ago by [csandreas1](https://wordpress.org/support/users/csandreas1/).
    -  This reply was modified 8 years, 8 months ago by [csandreas1](https://wordpress.org/support/users/csandreas1/).
 *  Plugin Author [cubecolour](https://wordpress.org/support/users/numeeja/)
 * (@numeeja)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/#post-9512671)
 * Tyche is a free theme from WordPress.org so I have been able to look at the theme’s
   files. The `the_post_thumbnail` function is called in `template-parts/content.
   php`. It not advised to edit the theme’s files directly, but to use a [child theme](https://codex.wordpress.org/Child_Themes)
   to apply the modifications.
 *  Thread Starter [csandreas1](https://wordpress.org/support/users/csandreas1/)
 * (@csandreas1)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/#post-9512761)
 * the code is here, i am trying to replace parts with the code you posted in your
   first post but the image dissapear i am replacing this
 *     ```
       <?php
       if ( has_post_thumbnail() ) {
       				echo ! is_single() ? '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' : '';
       				the_post_thumbnail( 'tyche-blog-post-image' );
       				echo ! is_single() ? '</a>' : '';
       			}
       			?>
       ```
   
 * with this
    :
 *     ```
       <?php
       if ( has_post_thumbnail() ) {//code in your second post} ?>
       ```
   
 * sorry i am new to php
    -  This reply was modified 8 years, 8 months ago by [csandreas1](https://wordpress.org/support/users/csandreas1/).
    -  This reply was modified 8 years, 8 months ago by [csandreas1](https://wordpress.org/support/users/csandreas1/).
    -  This reply was modified 8 years, 8 months ago by [csandreas1](https://wordpress.org/support/users/csandreas1/).
 *  Thread Starter [csandreas1](https://wordpress.org/support/users/csandreas1/)
 * (@csandreas1)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/#post-9512805)
 * [Here is the pages](https://frixsample2.mpoliasma.top/2017/09/16/s6-s-plus-lcd-replacement/)
   i need to activate the zoom
 *  Plugin Author [cubecolour](https://wordpress.org/support/users/numeeja/)
 * (@numeeja)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/#post-9513108)
 * try:
 *     ```
       <?php
       if ( has_post_thumbnail() ) {
           echo ! is_single() ? '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' : '';
   
           if ( function_exists('cc_zoom_featured_image') ) {
               cc_zoom_featured_image();
           } else {
               echo ! is_single() ? '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' : '';
               the_post_thumbnail( 'tyche-blog-post-image' );
           }
   
           echo ! is_single() ? '</a>' : '';
       }
       ?>
       ```
   
 *  Thread Starter [csandreas1](https://wordpress.org/support/users/csandreas1/)
 * (@csandreas1)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/#post-9513152)
 * i added that code, but the image dissappeared
 *  Plugin Author [cubecolour](https://wordpress.org/support/users/numeeja/)
 * (@numeeja)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/#post-9513167)
 * does it work with this instead?
 *     ```
       <?php
       if ( has_post_thumbnail() ) {
           echo ! is_single() ? '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' : '';
   
           if ( function_exists('cc_zoom_featured_image') ) {
   
               echo do_shortcode( '[zoom]' );
   
           } else {
               echo ! is_single() ? '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' : '';
               the_post_thumbnail( 'tyche-blog-post-image' );
           }
   
           echo ! is_single() ? '</a>' : '';
       }
       ?>
       ```
   
    -  This reply was modified 8 years, 8 months ago by [cubecolour](https://wordpress.org/support/users/numeeja/).
      Reason: oops - forgot the code tags
 *  Thread Starter [csandreas1](https://wordpress.org/support/users/csandreas1/)
 * (@csandreas1)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/#post-9513215)
 * i added your code but it doesn’t work.
 *  Plugin Author [cubecolour](https://wordpress.org/support/users/numeeja/)
 * (@numeeja)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/#post-9513222)
 * try again – I’ve edited my last reply; I’m multitasking & forgot to include the
   _code_ tags so the post displayed incorrectly
 *  Thread Starter [csandreas1](https://wordpress.org/support/users/csandreas1/)
 * (@csandreas1)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/#post-9513271)
 *     ```
       Warning:  Missing argument 1 for cc_zoom_featured_image(), called in /home/tsigjetn/frixsample2.mpoliasma.top/wp-content/themes/tyche/inc/class-tyche.php on line 272 and defined in /home/tsigjetn/frixsample2.mpoliasma.top/wp-content/plugins/featured-image-zoom/featured-image-zoom.php on line 84
   
       Notice:  Undefined variable: atts in /home/tsigjetn/frixsample2.mpoliasma.top/wp-content/plugins/featured-image-zoom/featured-image-zoom.php on line 92
       ```
   
 *  Thread Starter [csandreas1](https://wordpress.org/support/users/csandreas1/)
 * (@csandreas1)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/#post-9513280)
 * yep now it works! THanks for your help i will leave a review for the plugin asap.
   One last thing, where can i edit how much zoom i want? If you check the link 
   page i posted before, the zoom is too much and it loses quality. My image size
   is 730 x 435
    -  This reply was modified 8 years, 8 months ago by [csandreas1](https://wordpress.org/support/users/csandreas1/).
    -  This reply was modified 8 years, 8 months ago by [csandreas1](https://wordpress.org/support/users/csandreas1/).
 *  Plugin Author [cubecolour](https://wordpress.org/support/users/numeeja/)
 * (@numeeja)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/#post-9513449)
 * OK – I wasn’t testing the code before posting earlier so there were probably 
   errors.
 * I have now set up the free Tyche theme on a test site with the plugin & this 
   worked for me to replace the block specified earlier:
 *     ```
       <?php
           if ( has_post_thumbnail() ) {
   
               if ( function_exists('cc_zoom_featured_image') ) {
                   echo do_shortcode( '[zoom]' );
   
               } else {
                   echo ! is_single() ? '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' : '';
                   the_post_thumbnail( 'tyche-blog-post-image' );
                   echo ! is_single() ? '</a>' : '';
               }
           }
       ?>
       ```
   

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/page/2/?output_format=md)

The topic ‘Need help using this plugin on posts featured images’ is closed to new
replies.

 * ![](https://ps.w.org/featured-image-zoom/assets/icon-256x256.jpg?rev=1599203)
 * [Featured Image Zoom](https://wordpress.org/plugins/featured-image-zoom/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/featured-image-zoom/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/featured-image-zoom/)
 * [Active Topics](https://wordpress.org/support/plugin/featured-image-zoom/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/featured-image-zoom/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/featured-image-zoom/reviews/)

## Tags

 * [posts](https://wordpress.org/support/topic-tag/posts/)

 * 20 replies
 * 3 participants
 * Last reply from: [cubecolour](https://wordpress.org/support/users/numeeja/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/need-help-using-this-plugin-on-posts/page/2/#post-9566241)
 * Status: resolved