Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #921474

    Dear sirs,
    I need to enable a category filter in portfolio dashboard, for portfolio elements, as it happens for the post dashboard. Is it possible to add a script to the child function file that does this?
    Thanks so much


    Hey Alternalab,

    Thank you for using Enfold.

    Please use the “restrict_manage_posts” hook to add the category or taxonomy filters.

    function restrict_manage_posts_portfolio( $post_type, $which ) {
    	// Apply this only on a specific post type
    	if ( 'portfolio' !== $post_type )
    	// A list of taxonomy slugs to filter by
    	$taxonomies = array( 'portfolio_entries' );
    	foreach ( $taxonomies as $taxonomy_slug ) {
    		// Retrieve taxonomy data
    		$taxonomy_obj = get_taxonomy( $taxonomy_slug );
    		$taxonomy_name = $taxonomy_obj->labels->name;
    		// Retrieve taxonomy terms
    		$terms = get_terms( $taxonomy_slug );
    		// Display filter HTML
    		echo "<select name='{$taxonomy_slug}' id='{$taxonomy_slug}' class='postform'>";
    		echo '<option value="">' . sprintf( esc_html__( 'Show All %s', 'avia_framework' ), $taxonomy_name ) . '</option>';
    		foreach ( $terms as $term ) {
    				'<option value="%1$s" %2$s>%3$s (%4$s)</option>',
    				( ( isset( $_GET[$taxonomy_slug] ) && ( $_GET[$taxonomy_slug] == $term->slug ) ) ? ' selected="selected"' : '' ),
    		echo '</select>';
    add_action( 'restrict_manage_posts', 'restrict_manage_posts_portfolio' , 10, 2);

    // (Purchase code hidden if logged out) -the-dashboard/

    Best regards,


    It works!!!
    Thank you very much Ismael!


    Hi Alternalab,

    Glad we could help :)

    If you need further assistance please let us know.
    Best regards,


    Hi guys!
    I’ve got another small issue about that. I’m using a plugin called “Post Types Order”, which allows to reorder portfolio elements by a simple drag and drop. Once I filter the category, this feature is not active anymore and I’m not able to reorder the portfolio elements. Is there a way to leave the reordering feature active also after the filtering?
    Thank you



    I’m sorry but we don’t provide support for third party plugins as stated on our support policy. Please contact the plugin author for more info.

    Best regards,


    Hello Alternalab,
    I have exactly the same problem. I use the “Post Types Order” plugin and i need it to work when i filter the category for portfolio items.
    Did you find a solution for that?

    Any help will be much appreciated.

    Thank you


    Hi Dmanbo,

    I am afraid you’ll need to contact the plugin author for more info about the issue. Making third-party plugins compatible with the theme is unfortunately beyond the support scope we offer. Sorry for that!

    Best regards,


    The support team of “Post Types Order” plugin informed me that the paid version allow re-order inside categories. So that the answer. :-)
    I wrote it here to possibly help anyone having the same issue.

    Thank you

    • This reply was modified 5 months, 2 weeks ago by  Dmanbo.
Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.