• Resolved 3smedia

    (@3smedia)


    Hi there!
    I am new in this of wordpress and I need these featured-images that you have done in this plugin.

    I dont know where I have to write those codes,
    I mean this code to install a featured-image:

    if( class_exists( 'kdMultipleFeaturedImages' ) ) {
    
                    $args = array(
                            'id' => 'featured-image-2',
                            'post_type' => 'post',      // Set this to post or page
                            'labels' => array(
                                'name'      => 'Featured image 2',
                                'set'       => 'Set featured image 2',
                                'remove'    => 'Remove featured image 2',
                                'use'       => 'Use as featured image 2',
                            )
                    );
    
                    new kdMultipleFeaturedImages( $args );
            }

    and the “display the featured image in your theme”:

    if( class_exists( 'kdMultipleFeaturedImages' ) ) {
                kd_mfi_the_featured_image( 'featured-image-2', 'page' );
            }

    I dont know where to insert this codes. thanks!

    https://www.ads-software.com/extend/plugins/multiple-featured-images/

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Marcus Kober

    (@marcuskober)

    Hi!

    You have to put the following code into the functions.php of your current theme:

    if( class_exists( 'kdMultipleFeaturedImages' ) ) {
    
                    $args = array(
                            'id' => 'featured-image-2',
                            'post_type' => 'post',      // Set this to post or page
                            'labels' => array(
                                'name'      => 'Featured image 2',
                                'set'       => 'Set featured image 2',
                                'remove'    => 'Remove featured image 2',
                                'use'       => 'Use as featured image 2',
                            )
                    );
    
                    new kdMultipleFeaturedImages( $args );
    }

    Where do you want to display the second featured image? Please insert the following code in the appropriate file of your theme:

    if( class_exists( 'kdMultipleFeaturedImages' ) ) {
                kd_mfi_the_featured_image( 'featured-image-2', 'page' );
    }

    Typical files for this are e.g. header.php, page.php or single.php…

    Hi marcus.kober,

    Can’t seem to have the function displayed via the admin section after following your instructions.

    Added the following code to functions.php of my current theme:

    if( class_exists( 'kdMultipleFeaturedImages' ) ) {
    
                    $args = array(
                            'id' => 'featured-image-2',
                            'post_type' => 'post',      // Set this to post or page
                            'labels' => array(
                                'name'      => 'Featured image 2',
                                'set'       => 'Set featured image 2',
                                'remove'    => 'Remove featured image 2',
                                'use'       => 'Use as featured image 2',
                            )
                    );
    
                    new kdMultipleFeaturedImages( $args );
    }

    Is there a step that I’m missing?

    Hope to hear from you soon.

    Regards,
    Daniel.

    Plugin Author Marcus Kober

    (@marcuskober)

    Hello Daniel,

    one step is missing! You have to place the following code where you want to display the featured image. This might be header.php or single.php for expample…

    Code:

    if( class_exists( 'kdMultipleFeaturedImages' ) ) {
                kd_mfi_the_featured_image( 'featured-image-2', 'post' );
    }

    I hope this helps!

    Feel free to ask if you run into problems!

    Regards,
    Marcus

    Hi Marcus,

    Thanks for your reply. Haven’t got past the first stage. LOL.

    Things is, after placing the code in functions.php of my current theme, the ‘Featured Image 2’ box doesn’t show up in wp admin area.

    Thanks in advance.

    Regards,
    Daniel.

    Hi Marcus,

    Please ignore my last post… finally got it.

    Thanks for this!

    Regards,
    Daniel.

    Hi Marcus,

    After adding the

    if( class_exists( 'kdMultipleFeaturedImages' ) ) {
                kd_mfi_the_featured_image( 'featured-image-2', 'page' );
    }

    into my page.php. I get the following error.

    `Warning: Missing argument 3 for kd_mfi_the_featured_image(), called in /xxx/xxx/public_html/local/wp-content/themes/1140FluidStarkers/page.php on line 45 and defined in /xxx/xxx/public_html/local/wp-content/plugins/multiple-featured-images/multiple-featured-images.php on line 369′

    Please advice.

    Thanks in advance.

    Regards,
    Daniel.

    Plugin Author Marcus Kober

    (@marcuskober)

    Hi Daniel!

    Oh, my fault. You have to put the desired size into the function. For the full image insert the following code:

    if( class_exists( 'kdMultipleFeaturedImages' ) ) {
                kd_mfi_the_featured_image( 'featured-image-2', 'page', 'full' );
    }

    Regards,
    Marcus

    Hi Marcus,

    You’re a life saver. Thank you so much.

    Much appreciated.

    Take care.

    Regards,
    Daniel.

    Plugin Author Marcus Kober

    (@marcuskober)

    Hi Daniel,

    well, that’s my job! ??

    Have fun with the plugin.

    Regards,
    Marcus.

    Hi Marcus,
    I’ve installed your plugin, but I’m having some trouble getting the ‘feature image’ panel to show up on my ‘Pages’ like you show in the screen shots.

    I’m using the Esplanade Theme, which is based on the Twenty Eleven & the Twenty Ten themes.

    This means I actually have 3 functions.php files:
    1. wordpress\wp-content\themes\twentyeleven
    2. wordpress\wp-content\themes\twentyten
    3. wordpress\wp-includes

    I copy-pasted this:

    if( class_exists( 'kdMultipleFeaturedImages' ) ) {
                    $args = array(
                            'id' => 'featured-image-2',
                            'post_type' => 'page',      // Set this to post or page
                            'labels' => array(
                                'name'      => 'Featured image 2',
                                'set'       => 'Set featured image 2',
                                'remove'    => 'Remove featured image 2',
                                'use'       => 'Use as featured image 2',
                            )
                    );
                    new kdMultipleFeaturedImages( $args );
    }

    into the Twenty Eleven functions.php, but nothing happens.

    Next to that, I also have 3 header.php files:
    1. wordpress\wp-content\themes\twentyeleven
    2. wordpress\wp-content\themes\twentyten
    3. wordpress\wp-includes\theme-compat

    Again, I copy-pasted this

    if( class_exists( 'kdMultipleFeaturedImages' ) ) {
        kd_mfi_the_featured_image( 'featured-image-2', 'post' );
    }

    into the Twenty Eleven header.php

    Next to these issues, I also wonder if the location of the code within the php files makes a difference?

    Hope you can help me with this?
    Thanks in advance!
    Barbara

    i have getting the same problem, can u help me

    @anurag_aadi: Your domain name is currently contravening WordPress’ Trademark Policy.

    i am trying to getting licence for my word press theme can you guide me, how

    also i have got the solution for the plugin, but not able to update more them 2 featured image, please guide me

    hi @marcus.kober

    im working on this site at the min:
    https://www.passarella.co.uk/new-site/

    I added the code below to the functions.php page – Which brought up the extra featured image setting in wordpress posts page while in editing window no problem.

    if( class_exists( ‘kdMultipleFeaturedImages’ ) ) {

    $args = array(
    ‘id’ => ‘featured-image-2’,
    ‘post_type’ => ‘post’, // Set this to post or page
    ‘labels’ => array(
    ‘name’ => ‘Featured image 2’,
    ‘set’ => ‘Set featured image 2’,
    ‘remove’ => ‘Remove featured image 2’,
    ‘use’ => ‘Use as featured image 2’,
    )
    );

    new kdMultipleFeaturedImages( $args );
    }

    However when I added this code to slider-home.php nothing happened?

    if( class_exists( ‘kdMultipleFeaturedImages’ ) ) {
    kd_mfi_the_featured_image( ‘featured-image-2’, ‘page’, ‘full’ );
    }

    sure its something daft im not doing – basically just want to have a different image in the slider to the post image in boxes below – but they all need to click through to same post.

    Hope this make sense mate – would really appreciate the help!

    thanks in advance!

    mike

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[Plugin: Multiple Featured Images] Cant configure this, please help me!’ is closed to new replies.