Home Forums Plugin Support WP User Frontend Pro Featured Image

This topic is: resolved

This topic contains 20 replies, has 2 voices, and was last updated by  k69rocks 5 years, 8 months ago.

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #4402

    k69rocks
    Participant
    Post count: 27

    Hi,

    I am using Folio Grid Pro (http://www.frogsthemes.com/theme-switcher?demo=foliogridpro) with WP User Frontend Pro.

    Everything is working fine, except in order for the featured image to show on the home/category page, I have to re-update the post that was posted from the frontend…

    Anyway where it can post automatically? Some php snippet or something in the single.php or so?

    Also, if someone uploads an image that is too big for the post page, can I set a default (max. size) also as a php command somewhere? (Besides mentioning it on the Write a new post page how big the pic should be max.)

    Obviously, I would probably have to determine later, after the user has posted, if the post should be one, two, three column width on the home page. Unless that can be done automatically as well, depending on how big the featured image is.

    The site is:

    http://altheidelberg.com/

    Thanks!
    Richard

    P.S. I had a similar problem with the featured image with another theme, where it would appear twice in the post.

    #4422

    Tareq Hasan
    Keymaster
    Post count: 2831

    I think the featured image problem is happening from your theme. When you display a featured image, you've to specify the size of the image. For example, if you want to show thumbnail sized image, you've to use <?php the_post_thumbnail('thumbnail'); ?>. More details is here. That should solve your problem.

    You can't set the max height/width, but you can specify the image size. Smaller image size, smaller image 😉

    #4433

    k69rocks
    Participant
    Post count: 27

    This is the reply from the theme developers:

    “Hi Richard,

    I would imagine if you set the field for ‘Featured Image’ instead of ‘Image Upload’ it should work fine? It should be resized correctly by the theme also.
    You may need to set a custom field that is ‘media_use’ with the value ‘image’ to make it be used by the post automatically perhaps.

    You can probably also set a custom field option when a user is posting a post for ‘columns’ and the values ‘One’, ‘Two’ and ‘Three’ for the column widths.

    Glad the other theme is working well

    Kind regards,

    Nick”

    With custom fields I imagine he means an action hook?

    I tried the featured image php command, but that just adds another thumbnail in the post on the homepage/category page…

    Perhaps the css class is the answer? Even have 3 featured image fields with 1,2, or 3 column choice?

    Thanks!
    Richard

    #4436

    Tareq Hasan
    Keymaster
    Post count: 2831

    I think he is saying it right. I thought you were using the “Featured Image” field? If you are using the “Image Upload” field for uploading image and use the “Custom Fields in post” option from the plugin settings, the plugin will add the uploaded images in full size.

    Technically, only one image can be featured image and you need to use “Featured Image” field from the “Post Fields” section of “Form Elements”. I hope that will make sense to you.

    #4438

    k69rocks
    Participant
    Post count: 27

    Hi Tareq,

    as I mentioned to them, I am already using the Featured Image field….

    Hi NIck,

    I have Featured Image as field setup already. I don’t see anything for custom field (unless you mean action hooks?); however I can add a css class for the featured image field.

    Perhaps the css class is the answer? Even have 3 featured image fields with 1,2, or 3 column choice?

    Thanks!
    Richard

    Thanks,
    Richard

    #4439

    k69rocks
    Participant
    Post count: 27

    P.S. I tried CSS classes to no avail…the php command is probably somewhere missing in the theme. If all else fails, reposting the post and setting the width of the post, and maybe sometimes changing the image size afterwards should be no problem, if it isn't like 200 posts a day. 🙂

    #4443

    Tareq Hasan
    Keymaster
    Post count: 2831

    Can you post your site details (as a private reply)? I might check whats going on over there.

    #4453

    k69rocks
    Participant
    Post count: 27
    This reply has been marked as private.
    #4477

    Tareq Hasan
    Keymaster
    Post count: 2831

    Can you point me what post should I be looking at? Any pointer?

    #4492

    k69rocks
    Participant
    Post count: 27

    Best bet is posting a test post. 🙂

    #4495

    k69rocks
    Participant
    Post count: 27

    Frogs responded with:

    Hi Richard,

    I’m not fully sure on how the plugin works. It may not like the way the featured image is pulled out in our theme. I would imagine that it would allow you to add custom fields though that I suggested and that should solve it for you I would think.

    Kind regards,

    Nick

    #4502

    Tareq Hasan
    Keymaster
    Post count: 2831

    I posted a new post with featured image. The featured image is showing in the single post, but not on the homepage. Is that the problem?

    #4503

    k69rocks
    Participant
    Post count: 27

    Yes. 🙂

    #4509

    Tareq Hasan
    Keymaster
    Post count: 2831

    Right, so the theme is doing something. I didn't understood, but “Nick” already mentioned it. There is a custom field “media_use” and it needs to have the value “image”. When you are creating posts from WPUF, that custom field is not being added and thats the problem.

    Insert this php code in your themes functions.php and it should work from now.
    [php]
    /**
    * Update the custom field when the form submits
    *
    * @param type $post_id
    */
    function wpufe_folio_grid( $post_id ) {
    update_post_meta( $post_id, ‘media_use', ‘image' );
    }

    add_action( ‘wpuf_add_post_after_insert', ‘wpufe_folio_grid' );
    add_action( ‘wpuf_edit_post_after_update', ‘wpufe_folio_grid' );
    [/php]

    #4531

    k69rocks
    Participant
    Post count: 27

    That worked! Thanks, Tareq! Having much fun with this plugin…!

Viewing 15 posts - 1 through 15 (of 21 total)

The topic ‘Featured Image’ is closed to new replies.