Home › Forums › Basel support forum › Revolution Slider cant load portfolio/ projects custom post type might be a bug
Revolution Slider cant load portfolio/ projects custom post type might be a bug
- This topic has 14 replies, 2 voices, and was last updated 7 years, 3 months ago by Artem Temos.
-
AuthorPosts
-
September 18, 2017 at 5:05 pm #19695
andre.someproParticipantHi,
I tried creating a post-based slider using a selection of Post Ids mixing post, products, porfolio items via their post IDs.
The porfolio items wont load by revolution slider. I have a licence and contactet the revolutino slider guys. They troubleshooted that issue and stated that its a theme based error.Strange is, that the slider detects and fetches the portfolio posts on a category based + recent-posts configuration of revolution slider. So the slider is able to fetch portfolio content at all, but not on certain configuration post based + selection of IDs.
Im trying to get behind this error I just want to inform you about that issue.
best regards
Andre
September 18, 2017 at 7:29 pm #19703
Artem TemosKeymasterHello,
Our projects are a regular custom type created by WordPress code standards. If there are some additional requirements from Revolution Slider to make it compatible with their functionality so just let us know and we will implement them in our theme.
Regards
September 20, 2017 at 12:05 am #19823
andre.someproParticipantAfter troubleshooting (disable all plugins) generating a custom post type via CPT UI we im sure its a theme based problem. The strange thing is the revolution slider fetches portfolio items on recent post based slides. But he cant fetch portfolio posts via list of Ids.
Please try it on your own installations. It takes a minute to set a demo slider using list of IDs and just force it to showcase a list of portfolio post Ids. It wont work
Ive copied the post-types.php of theme to Themepunch of revolution slider they try to find out whats going on. best regards
Andre
September 20, 2017 at 6:14 am #19830
Artem TemosKeymasterHi,
Please, provide us a step by step description how we can reproduce the issue on our side. Also, ask Revolution Slider what is wrong from our side if they told that our theme post type is not compatible.
Thank you in advance.
September 20, 2017 at 7:18 am #19849
andre.someproParticipantHi, thank you for rechecking o your side.
Just take any slider with featured image as background and select post based by Ids. You will notice
portfolio item wont be fetched up, all others items will.best regards
Andre
Attachments:
You must be logged in to view attached files.September 20, 2017 at 7:32 am #19856
Artem TemosKeymasterCan you ask Revolution Slide what requirements do they have for custom post types to make it compatible with their slider? We use native WordPress function
register_post_type
to register it as well as all other themes and plugins.September 20, 2017 at 9:16 am #19858
andre.someproParticipantIm in contact with them and will keep you updated.
September 20, 2017 at 10:40 am #19860
andre.someproParticipantThemepunch wrote back: Here is the general standard code which works great with slider.
// Register Custom Post Type function custom_post_type() { $labels = array( 'name' => _x( 'Post Types', 'Post Type General Name', 'text_domain' ), 'singular_name' => _x( 'Post Type', 'Post Type Singular Name', 'text_domain' ), 'menu_name' => __( 'Post Types', 'text_domain' ), 'name_admin_bar' => __( 'Post Type', 'text_domain' ), 'archives' => __( 'Item Archives', 'text_domain' ), 'attributes' => __( 'Item Attributes', 'text_domain' ), 'parent_item_colon' => __( 'Parent Item:', 'text_domain' ), 'all_items' => __( 'All Items', 'text_domain' ), 'add_new_item' => __( 'Add New Item', 'text_domain' ), 'add_new' => __( 'Add New', 'text_domain' ), 'new_item' => __( 'New Item', 'text_domain' ), 'edit_item' => __( 'Edit Item', 'text_domain' ), 'update_item' => __( 'Update Item', 'text_domain' ), 'view_item' => __( 'View Item', 'text_domain' ), 'view_items' => __( 'View Items', 'text_domain' ), 'search_items' => __( 'Search Item', 'text_domain' ), 'not_found' => __( 'Not found', 'text_domain' ), 'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ), 'featured_image' => __( 'Featured Image', 'text_domain' ), 'set_featured_image' => __( 'Set featured image', 'text_domain' ), 'remove_featured_image' => __( 'Remove featured image', 'text_domain' ), 'use_featured_image' => __( 'Use as featured image', 'text_domain' ), 'insert_into_item' => __( 'Insert into item', 'text_domain' ), 'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ), 'items_list' => __( 'Items list', 'text_domain' ), 'items_list_navigation' => __( 'Items list navigation', 'text_domain' ), 'filter_items_list' => __( 'Filter items list', 'text_domain' ), ); $args = array( 'label' => __( 'Post Type', 'text_domain' ), 'description' => __( 'Post Type Description', 'text_domain' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'trackbacks', 'custom-fields', 'page-attributes', 'post-formats', ), 'taxonomies' => array( 'category', 'post_tag' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', ); register_post_type( 'post_type', $args ); } add_action( 'init', 'custom_post_type', 0 );
September 20, 2017 at 12:04 pm #19863
Artem TemosKeymasterWe use an absolutely similar code in our theme. Here it is
add_action( 'init', array($this, 'register_portfolio'), 1 ); public function register_portfolio() { $labels = array( 'name' => _x( 'Portfolio', 'Post Type General Name', $this->domain ), 'singular_name' => _x( 'Project', 'Post Type Singular Name', $this->domain ), 'menu_name' => __( 'Projects', $this->domain ), 'parent_item_colon' => __( 'Parent Item:', $this->domain ), 'all_items' => __( 'All Items', $this->domain ), 'view_item' => __( 'View Item', $this->domain ), 'add_new_item' => __( 'Add New Item', $this->domain ), 'add_new' => __( 'Add New', $this->domain ), 'edit_item' => __( 'Edit Item', $this->domain ), 'update_item' => __( 'Update Item', $this->domain ), 'search_items' => __( 'Search Item', $this->domain ), 'not_found' => __( 'Not found', $this->domain ), 'not_found_in_trash' => __( 'Not found in Trash', $this->domain ), ); $args = array( 'label' => __( 'portfolio', $this->domain ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_position' => 28, 'menu_icon' => 'dashicons-images-alt2', 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => true, 'publicly_queryable' => true, 'rewrite' => array('slug' => 'portfolio'), 'capability_type' => 'page', ); register_post_type( 'portfolio', $args ); /** * Create a taxonomy category for portfolio * * @uses Inserts new taxonomy object into the list * @uses Adds query vars * * @param string Name of taxonomy object * @param array|string Name of the object type for the taxonomy object. * @param array|string Taxonomy arguments * @return null|WP_Error WP_Error if errors, otherwise null. */ $labels = array( 'name' => _x( 'Project Categories', 'Taxonomy plural name', $this->domain ), 'singular_name' => _x( 'Project Category', 'Taxonomy singular name', $this->domain ), 'search_items' => __( 'Search Categories', $this->domain ), 'popular_items' => __( 'Popular Project Categories', $this->domain ), 'all_items' => __( 'All Project Categories', $this->domain ), 'parent_item' => __( 'Parent Category', $this->domain ), 'parent_item_colon' => __( 'Parent Category', $this->domain ), 'edit_item' => __( 'Edit Category', $this->domain ), 'update_item' => __( 'Update Category', $this->domain ), 'add_new_item' => __( 'Add New Category', $this->domain ), 'new_item_name' => __( 'New Category', $this->domain ), 'add_or_remove_items' => __( 'Add or remove Categories', $this->domain ), 'choose_from_most_used' => __( 'Choose from most used text-domain', $this->domain ), 'menu_name' => __( 'Category', $this->domain ), ); $args = array( 'labels' => $labels, 'public' => true, 'show_in_nav_menus' => true, 'show_admin_column' => false, 'hierarchical' => true, 'show_tagcloud' => true, 'show_ui' => true, 'query_var' => true, 'rewrite' => true, 'query_var' => true, 'capabilities' => array(), ); register_taxonomy( 'project-cat', array( 'portfolio' ), $args ); }
Regards
September 25, 2017 at 7:25 pm #20203
andre.someproParticipantFor themepunch from revolution slider its a theme related issue. I will hire a programmer to solve the issue since I need this function.
Another Example:
If you install CPtomonies plugin it will warn you in its setting pages that portfolio is not a wordpress registered post type. It can detect it but it doesnt guarantee for the functionality with this post type.I will inform you as soon as I know whats the matter with this slider problem.
best regards
Andre
September 25, 2017 at 7:31 pm #20207
Artem TemosKeymasterOK, we will check with CPtomonies plugin too and try to solve the problem if it is caused by our theme.
September 25, 2017 at 7:43 pm #20209
andre.someproParticipantHi forget about CPT-onomies plugin It detects the porfolio custom post type as correct since its update.
I just checked because I wantet to sent you a screenshot in case.
September 26, 2017 at 6:21 am #20224
Artem TemosKeymasterOK, contact us if you will have any additional information about the issue.
October 6, 2017 at 4:13 pm #20958
andre.someproParticipantThe issue was in the definition of the ‘portfolio’ custom post type:
the ‘exclude_from_search’ parameter was set to true – this was the cause of Revolution Slider not seeing this post type.
I changed it to false and it should work.
October 7, 2017 at 1:24 am #20980
Artem TemosKeymasterThank you so much for posting your solution here. We will consider adding this fix to the core in our future updates.
Kind Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register