Hi,
I’m trying to get the following urls for the portfolio:
Main portfolio page: domain.com/resources
Portfolio item: domain.com/resources/item
Portfolio category page: domain.com/resources/category/category-name
The idea behind this is that it follows the same structure as easy digital downloads.
Download item: domain.com/downloads/item
Download category page: domain.com/downloads/category/category-name
I’m almost there, the only conflict I’m having is the category page. I get page not found 404 when I set the slug to ‘resources/category’ but if I set it to something else like ‘resourcesalt/category’ it works. So there is a conflict somehow. Here’s the code from my functions.php:
function register_portfolio_post_type() {
$portfolio_args = array(
'labels' => $portfolio_labels,
'public' => true,
'has_archive' => true,
'menu_icon' => 'dashicons-images-alt2',
'rewrite' => array( 'slug' => 'resources' ),
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'category', 'custom-fields', 'post-formats', 'comments' ),
);
register_post_type( 'array-portfolio', $portfolio_args );
}
add_action( 'wp_loaded', 'register_portfolio_post_type' );
function register_portfolio_taxonomies() {
register_taxonomy( 'categories', 'array-portfolio', array(
'hierarchical' => true,
'label' => __( 'Categories', 'array-toolkit' ),
'query_var' => true,
'rewrite' => array('slug' => 'resources/category', 'with_front' => false, 'hierarchical' => true ),
) );
}
add_action( 'wp_loaded', 'register_portfolio_taxonomies' );
]]>
please fix the constructor deprecation introduced in WP 4.3
PHP Error Count Location Call Stack Component
Notice Die verwendete Konstruktoren-Methode für WP_Widget ist seit Version 4.3.0 veraltet! Verwende stattdessen
__construct()
. 3 wp-includes/functions.php:3457 _deprecated_constructor()
WP_Widget->WP_Widget()
Array_Dribbble_Widget->array_dribbble_widget()
WP_Widget_Factory->register()
register_widget()
array_toolkit_dribbble_widget()
do_action('widgets_init')
wp_widgets_init()
do_action('init') Core
]]>
How do you recommend handling portrait images in the portfolio?
]]>Just out of curiosity: I assume the plugin is compatible with WP 3.9.2 and 4.0, but it doesn’t say so. Why?
]]>