Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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

    Thread Starter rob1920

    (@rob1920)

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

    thanks

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