• Resolved pank6119

    (@pank6119)


    This Problem Might not be Related To theme, It Can Be how WordPress Works or Plugins Way Of Working But If any Expert Can help be out in This will be Very Helpful i m using oceanwp Maria Theme

    I have Done Some Coding & Tried To Create New Post Using WordPress Quick Edit Form Just Changing some field and added some more Fields like feature Image from Url (fifu image) field can be updated from Quick edit form Here is screenshot of my quick edit form

    https://i.imgur.com/JDCTiZg.jpg

    Everything Is Working fine Img url that I add in fifu img url Field Is displaying in Backend SS of admin backend Post Edit that is displaying Fifu Image nd all details correctly

    https://i.imgur.com/tEIsMMB.jpg

    But Since I have created this post through Quick Edit form nd never Clicked on Edit Form n Updated From There So Image is not being displayed on Homepage SS of website Author Page that displays Latest posts is below https://i.imgur.com/mQvsHyV.jpg

    refering to post 1282 As u can see in edit form Image from fifu is displaying in edit form of backend but not in blog entry page of author or any page in front end Until I go Through edit form And just click on Update Button.

    Please help me to find A way to display these images without going to full edit form just to click update

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello @pank6119,

    It seems like you’ve created a custom solution for adding and updating posts in WordPress with a feature to add images via URL. We need to see your code to provide specific help. Providing specific code snippets or solutions without seeing your actual code is challenging. Kindly share your code here, we’ll check it and try to find a solution.

    I just tested FIFU plugin and saw no issue on my end: https://postimg.cc/gallery/yJxrLjk/aadec2b4. However, to check the featured image is enabled on the theme, please navigate to WP Dashboard > Appearance > Customizer > Blog > Blog Entries, and ensure the featured image is enabled on element positioning like this: https://postimg.cc/4nW0fRyF. I hope it helps.

    Also, you can get in touch with your third-party plugin author.
    Maybe they have a solution that we are not aware of.

    Best Regards

    Thread Starter pank6119

    (@pank6119)

    Hello @skalanter Thank u For Quick Response & Helping U have Always Helped Me Alot. ??

    First of all I m Not So Good In Coding ?? So I Found Few Jack’s nd Being Lucky I Found A Plugin Custom / Bulk Quick Edit Which Helped me To Add Custom Fields so i added custom column

    $columns[‘fimg_url’] = esc_html__( ‘FImg Url’ ); &

    add_action( 'save_post', 'update_fifu_image_url', 10, 2 );
    
    function update_fifu_image_url( $post_id, $post ) {
        // Check if the post type is 'post'
        if ( $post->post_type !== 'post' ) {
            return;
        }
        
        // Get the value of the fimg_url meta key
        $fimg_url = get_post_meta( $post_id, 'fimg_url', true );
        
        // If fimg_url is not empty, update the fifu_image_url field
        if ( ! empty( $fimg_url ) ) {
            update_post_meta( $post_id, 'fifu_image_url', $fimg_url );
        }
    }

    Then replicated fifu_image_url with value of fimg_url column

    Fifu_Image_Url is Column That is responsible to display feature image from url using fifu plugin so this way from i m trying to update fifu image url and I using Post Duplicator to duplicate post a private post with blank values to new updated values

    And My problem is Homepage is not displaying Feature Image Might be bcoz Feature image from url plugin might be also replicating value to feature image folder and ocean wp might take feature image from that column

    Hello @pank6119,

    The issue is that the featured image doesn’t update when saving a post using quick edit. This is because the quick edit bypasses the regular post-editing screen.

    I’ve tested your plugin without any custom plugin, and that was working well on my end, but since you are using code, you can edit that function to this one:

    function update_fifu_image_url( $post_id, $post ) {
        // Check if the post type is 'post'
        if ( $post->post_type !== 'post' ) {
            return;
        }
    
        // Get the value of the fimg_url meta key
        $fimg_url = get_post_meta( $post_id, 'fimg_url', true );
    
        // If fimg_url is not empty, update the featured image
        if ( ! empty( $fimg_url ) ) {
            update_post_meta( $post_id, '_thumbnail_id', attachment_url_to_postid( $fimg_url ) );
        }
    }
    add_action( 'save_post', 'update_fifu_image_url', 10, 2 );

    I’ve edited the “update_post_meta”.

    Before trying the code, remove it and check if it is working or not, you may not need to add the custom function above. This is outside the theme’s support, so please check the documentation for your plugin to see if it automatically updates the featured image.

    Note: After updating the code above, you first need to save all permalinks again(just click on the save button on WP Dashboard > Settings > Permalinks – the best permalink is PostName). Then go to your desired post and click on update the post.

    I hope it helps,
    Best Regards

    Thread Starter pank6119

    (@pank6119)

    Hello @skalanter Thanks for Quick reply I m still confused when fifu image url column has value of img url why i need to update _thumbnail_id with attachment_url_to_postid( $fimg_url ) . Ok i will still update and try this code for sure ?? bcoz feature img is important for post on searching a post or while sharing though i hv already Updated my website to directly display videos rather than feature Image on homepage i have added this code in css to hide feature image

    .blog-entry .thumbnail img {
        display: none;
    }

    If there is any other good way to hide feature image from blog-entry pages otherwise thanks for all help i will mark it as resolved if that’s a right way to hide feature image and thanks for above code i will implement it to display images if required on single entry or search page

    Hello @pank6119,

    You’re welcome. I’m glad we could help.
    Please try that code, I hope that helps. And yes, your custom CSS is correct, and you can use it; it is a valid way to hide the featured image.
    Should you have any further questions, please let us know.

    Best Regards

    Thread Starter pank6119

    (@pank6119)

    thank You very much @skalanter bro u have been very helpful to me building this website ?????? ??marking this resolved

    • This reply was modified 1 year, 2 months ago by pank6119.

    You’re most welcome, and I’m glad we could help.

    Cheers

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Why Feature Image From FIfu Plugin Is not Displaying on Home / Entry Pages’ is closed to new replies.