• Resolved rob1920

    (@rob1920)


    hi
    i recently updated my websites plugins and now my featured image has stopped working on my custom posts
    according to my theme provider they found that
    “I checked the HTML of the page, it seems the shortcode you’re using there to insert the posts doesn’t seem to add any html for featured images.”

    can you help please

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not really related to our plugin, but if you can provide the shortcode function being used for the shortcode, I can offer some feedback for it.

    Thread Starter rob1920

    (@rob1920)

    hi
    the shortcode is [ic_add_posts post_type=’properties’ showposts=’50’ orderby= ‘menu_order’ order=’ASC’]

    thanks

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Hmm, that part of the shortcode setup isn’t providing much. I’d need the code side of things, to see what all it does to determine output for the shortcode once rendered.

    Is this a plugin you’re using for your site? https://ww.wp.xz.cn/plugins/posts-in-page/ It came up as part of some googling I did for the shortcode in question.

    Thread Starter rob1920

    (@rob1920)

    hi michael
    we are using posts in page and custom post type ui. i am sorry a third party setup our website and not very well i am constantly having to get the custom posts correct and as they should be

    this is the code for the custom ui
    function cptui_register_my_cpts() {

    /**
    * Post Type: Properties .
    */

    $labels = array(
    “name” => __( ‘Properties ‘, ‘Avada’ ),
    “singular_name” => __( ‘Property’, ‘Avada’ ),
    “menu_name” => __( ‘Properties’, ‘Avada’ ),
    “all_items” => __( ‘All Properties’, ‘Avada’ ),
    “add_new” => __( ‘Add New’, ‘Avada’ ),
    “add_new_item” => __( ‘Add New Property’, ‘Avada’ ),
    “edit_item” => __( ‘Edit Property’, ‘Avada’ ),
    “new_item” => __( ‘New Property’, ‘Avada’ ),
    “view_item” => __( ‘View Property’, ‘Avada’ ),
    “search_items” => __( ‘Search Property’, ‘Avada’ ),
    “not_found” => __( ‘No Properties found’, ‘Avada’ ),
    “not_found_in_trash” => __( ‘No Propertie found in Trash’, ‘Avada’ ),
    );

    $args = array(
    “label” => __( ‘Properties ‘, ‘Avada’ ),
    “labels” => $labels,
    “description” => “you can add here all Properties that you want to show in specific pages “,
    “public” => true,
    “publicly_queryable” => true,
    “show_ui” => true,
    “show_in_rest” => false,
    “rest_base” => “”,
    “has_archive” => false,
    “show_in_menu” => true,
    “exclude_from_search” => false,
    “capability_type” => “post”,
    “map_meta_cap” => true,
    “hierarchical” => false,
    “rewrite” => array( “slug” => “properties”, “with_front” => true ),
    “query_var” => true,
    “menu_position” => 100,
    “menu_icon” => “dashicons-portfolio”,
    “supports” => array( “title”, “editor”, “excerpt”, “custom-fields”, “revisions” ),
    );

    register_post_type( “properties”, $args );

    /**
    * Post Type: Investments.
    */

    $labels = array(
    “name” => __( ‘Investments’, ‘Avada’ ),
    “singular_name” => __( ‘Investment’, ‘Avada’ ),
    “menu_name” => __( ‘Investments’, ‘Avada’ ),
    “all_items” => __( ‘All Investments’, ‘Avada’ ),
    “add_new” => __( ‘Add new’, ‘Avada’ ),
    “add_new_item” => __( ‘Add New Investment’, ‘Avada’ ),
    “edit_item” => __( ‘Edit Investment’, ‘Avada’ ),
    “new_item” => __( ‘New Investment’, ‘Avada’ ),
    “view_item” => __( ‘View Investment’, ‘Avada’ ),
    “search_items” => __( ‘Search Investment’, ‘Avada’ ),
    “not_found” => __( ‘No Investment found’, ‘Avada’ ),
    “not_found_in_trash” => __( ‘Not Investment Found in Trash’, ‘Avada’ ),
    );

    $args = array(
    “label” => __( ‘Investments’, ‘Avada’ ),
    “labels” => $labels,
    “description” => “your can add your Investment as you want “,
    “public” => true,
    “publicly_queryable” => true,
    “show_ui” => true,
    “show_in_rest” => false,
    “rest_base” => “”,
    “has_archive” => false,
    “show_in_menu” => true,
    “exclude_from_search” => false,
    “capability_type” => “post”,
    “map_meta_cap” => true,
    “hierarchical” => false,
    “rewrite” => array( “slug” => “investment”, “with_front” => true ),
    “query_var” => true,
    “menu_icon” => “dashicons-portfolio”,
    “supports” => array( “title”, “editor”, “thumbnail”, “excerpt”, “custom-fields”, “page-attributes”, “post-formats” ),
    );

    register_post_type( “investment”, $args );

    /**
    * Post Type: test.
    */

    $labels = array(
    “name” => __( ‘test’, ‘Avada’ ),
    “singular_name” => __( ‘test1’, ‘Avada’ ),
    “menu_name” => __( ‘test’, ‘Avada’ ),
    “all_items” => __( ‘all test’, ‘Avada’ ),
    “add_new” => __( ‘add new’, ‘Avada’ ),
    “add_new_item” => __( ‘add new test’, ‘Avada’ ),
    “edit_item” => __( ‘edit test’, ‘Avada’ ),
    “new_item” => __( ‘new test’, ‘Avada’ ),
    “view_item” => __( ‘view test’, ‘Avada’ ),
    “search_items” => __( ‘search test’, ‘Avada’ ),
    “not_found” => __( ‘no test found’, ‘Avada’ ),
    “not_found_in_trash” => __( ‘no test found in bin’, ‘Avada’ ),
    );

    $args = array(
    “label” => __( ‘test’, ‘Avada’ ),
    “labels” => $labels,
    “description” => “”,
    “public” => true,
    “publicly_queryable” => true,
    “show_ui” => true,
    “show_in_rest” => false,
    “rest_base” => “”,
    “has_archive” => false,
    “show_in_menu” => true,
    “exclude_from_search” => false,
    “capability_type” => “post”,
    “map_meta_cap” => true,
    “hierarchical” => false,
    “rewrite” => array( “slug” => “test”, “with_front” => true ),
    “query_var” => true,
    “menu_icon” => “dashicons-portfolio”,
    “supports” => array( “title”, “editor”, “thumbnail”, “excerpt”, “custom-fields”, “revisions” ),
    );

    register_post_type( “test”, $args );
    }

    add_action( ‘init’, ‘cptui_register_my_cpts’ );

    i also have this in my child theme
    div.wpcf7-validation-errors {
    float: left;
    }
    body.page-id-11583 .fusion-layout-column:nth-child(3n),
    body.page-id-11590 .fusion-layout-column:nth-child(3n) {
    margin-right: 0;
    }
    body.page-id-11583 .fusion-layout-column:nth-child(3n+1),
    body.page-id-11590 .fusion-layout-column:nth-child(3n+1) {
    clear: left;
    }
    .cpt-list h2 {
    margin-bottom: 3px;
    line-height: 23px !important;
    }
    .cpt-list h2 a {
    font-size: 18px;
    font-weight: bold;
    }
    .cpt-list .featured-image {
    margin-bottom: 4px;
    position: relative;
    }
    .single-investment .related-posts,
    .single-investment .about-author,
    .single-investment p.no-comments,
    .single-investment .fusion-sharing-box,
    .single-investment .fusion-meta-info,
    .single-investment .post-slideshow,
    .single-investment h2.entry-title,
    .single-investment .comment-respond,
    .single-properties .related-posts,
    .single-properties .about-author,
    .single-properties p.no-comments,
    .single-properties .fusion-sharing-box,
    .single-properties .fusion-meta-info,
    .single-properties .post-slideshow,
    .single-properties h2.entry-title,
    .single-properties .comment-respond {
    display: none !important;
    }
    img.stamp {
    display: none !important;
    position: absolute;
    right: 5px;
    top: 5px;
    z-index: 100;
    }
    body.page-id-11590 img.stamp {
    display: none;
    }
    span.wpcf7-list-item { display: block; }

    not sure if there is anything else you need
    thank you

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not seeing much that feels related at all. If the plugin I previously linked is for sure the one being used by your site, then out of the box, it’s not doing much at all with regards to featured images. I can’t see anything related to image display at all. It does look like there’s potentially a posts_loop_template.php file in your active theme’s directory, and it may be customized from there. Nothing that CPTUI is going to be touching though.

    Hi @rob1920,

    @tw2113 is completely right – to show the featured image when using Posts in Page, you’ll need to tweak the output template.

    https://ww.wp.xz.cn/plugins/posts-in-page/installation/

    Instructions: https://ww.wp.xz.cn/support/topic/how-to-add-featured-image/

    I hope that helps!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘featured image stopped working’ is closed to new replies.