Title: sebmeric's Replies | WordPress.org

---

# sebmeric

  [  ](https://wordpress.org/support/users/sebmeric/)

 *   [Profile](https://wordpress.org/support/users/sebmeric/)
 *   [Topics Started](https://wordpress.org/support/users/sebmeric/topics/)
 *   [Replies Created](https://wordpress.org/support/users/sebmeric/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/sebmeric/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/sebmeric/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/sebmeric/engagements/)
 *   [Favorites](https://wordpress.org/support/users/sebmeric/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/users/sebmeric/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/sebmeric/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Filterable Portfolio] Shortcodes in portfolio are not interpreted](https://wordpress.org/support/topic/shortcodes-in-portfolio-are-not-interpreted/)
 *  Thread Starter [sebmeric](https://wordpress.org/support/users/sebmeric/)
 * (@sebmeric)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/shortcodes-in-portfolio-are-not-interpreted/#post-15096978)
 * Hi [@tanne1](https://wordpress.org/support/users/tanne1/) ,
 * I believe you can still use the version on github here : [https://github.com/sayful1/filterable-portfolio](https://github.com/sayful1/filterable-portfolio)
 * Or you can edit the plugin core file templates/single-portfolio.php and do the
   changes yourself. Beware that a plugin update will remove any changes you may
   have done…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Filterable Portfolio] Shortcodes in portfolio are not interpreted](https://wordpress.org/support/topic/shortcodes-in-portfolio-are-not-interpreted/)
 *  Thread Starter [sebmeric](https://wordpress.org/support/users/sebmeric/)
 * (@sebmeric)
 * [5 years ago](https://wordpress.org/support/topic/shortcodes-in-portfolio-are-not-interpreted/#post-14924333)
 * Ok !
 * I remember now. That was a pullrequest I did a year ago on the plugin github 
   repo :
    [https://github.com/sayful1/filterable-portfolio/pull/8](https://github.com/sayful1/filterable-portfolio/pull/8)
 * It seems you used another way to release this new version using an older version.
   The assets folder is a bit different now and the 3 pullrequests you merged were
   removed…
 * [https://github.com/sayful1/filterable-portfolio/pull/7](https://github.com/sayful1/filterable-portfolio/pull/7)
   
   [https://github.com/sayful1/filterable-portfolio/pull/10](https://github.com/sayful1/filterable-portfolio/pull/10)
 * Please, let me know what are your plans for the furure concerning those modifications
   as I had to do them manualy editing your plugin and changing the version number
   to avoid new updates…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Enable jQuery Migrate Helper] JS error](https://wordpress.org/support/topic/js-error-115/)
 *  [sebmeric](https://wordpress.org/support/users/sebmeric/)
 * (@sebmeric)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/js-error-115/#post-13654498)
 * same here too…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Filterable Portfolio] filter hook for date removal not working](https://wordpress.org/support/topic/filter-hook-for-date-removal-not-working/)
 *  [sebmeric](https://wordpress.org/support/users/sebmeric/)
 * (@sebmeric)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/filter-hook-for-date-removal-not-working/#post-12536655)
 * Hi,
 * I just created a pull request on this plugin repo on github to patch this unexpected
   beaviour :
    [https://github.com/sayful1/filterable-portfolio/pull/7](https://github.com/sayful1/filterable-portfolio/pull/7)
 * Wait and see…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MailPoet Newsletters (Previous)] Adding checkbox to custom registration form](https://wordpress.org/support/topic/adding-checkbox-to-custom-registration-form/)
 *  [sebmeric](https://wordpress.org/support/users/sebmeric/)
 * (@sebmeric)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/adding-checkbox-to-custom-registration-form/#post-8722802)
 * Hi,
 * Maybe this article could help :
    [http://docs.mailpoet.com/article/67-plugin-form-integrate](http://docs.mailpoet.com/article/67-plugin-form-integrate)
 * Regards
 * Séb.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MailPoet Newsletters (Previous)] Add to List based on User Roles](https://wordpress.org/support/topic/add-to-list-based-on-user-roles/)
 *  [sebmeric](https://wordpress.org/support/users/sebmeric/)
 * (@sebmeric)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/add-to-list-based-on-user-roles/#post-6272582)
 * Hi,
 * I think i’ve got the same question… I need to have a list of all my WooCommerce“
   customer” user role to send them a personalized newsletter but I can’t find where
   to do that. Reading this topic it seems that it is not possible (yet) but I found
   that on your premium page ([https://www.mailpoet.com/premium/](https://www.mailpoet.com/premium/))
   you say _“Create automated user role-based emails”_. Isn’t that what I’m looking
   for ? Could you tell me how to do that as I can’t find the right place in my 
   WordPress backend ?
 * Thanks a lot.
 * Séb.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Disable Author Pages] implementation if wordpress is in a subdirectory](https://wordpress.org/support/topic/implementation-if-wordpress-is-in-a-subdirectory/)
 *  Thread Starter [sebmeric](https://wordpress.org/support/users/sebmeric/)
 * (@sebmeric)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/implementation-if-wordpress-is-in-a-subdirectory/#post-5531409)
 * no problem ! now i know you’re on it 🙂 thanks.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Disable Author Pages] implementation if wordpress is in a subdirectory](https://wordpress.org/support/topic/implementation-if-wordpress-is-in-a-subdirectory/)
 *  Thread Starter [sebmeric](https://wordpress.org/support/users/sebmeric/)
 * (@sebmeric)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/implementation-if-wordpress-is-in-a-subdirectory/#post-5531407)
 * I’ve made a pull request on github for this 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[File Un-Attach] [Plugin: File Un-Attach] not sure that multiple attachments is working properly](https://wordpress.org/support/topic/plugin-file-un-attach-not-sure-that-multiple-attachments-is-working-properly/)
 *  [sebmeric](https://wordpress.org/support/users/sebmeric/)
 * (@sebmeric)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-file-un-attach-not-sure-that-multiple-attachments-is-working-properly/#post-2248992)
 * after more tests, i see that the function does not work wery well… so here is
   a better one :
 *     ```
       <?php
       /*
       Plugin Name: File Un-Attach Helper Functions
       Plugin URI: http://www.xparkmedia.com
       Description: This function must be used to retrieve attachments added to multiple posts by File Un-Attach.
       Author: Sébastien Méric
       Version: 0.1
       Author URI: http://www.sebastien-meric.com
       Requires at least: 3.1.0
       Tested up to: 3.2
   
       Copyright 2010-2011 by Sébastien Méric http://www.sebastien-meric.com
   
       This program is free software; you can redistribute it and/or modify
       it under the terms of the GNU General Public License as published by
       the Free Software Foundation; either version 2 of the License,or
       (at your option) any later version.
   
       This program is distributed in the hope that it will be useful,
       but WITHOUT ANY WARRANTY; without even the implied warranty of
       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
       GNU General Public License for more details.
   
       You should have received a copy of the GNU General Public License
       along with this program; if not,write to the Free Software
       Foundation,Inc.,51 Franklin St,Fifth Floor,Boston,MA 02110-1301 USA
       */ 
   
       // Stop direct access of the file
       if(preg_match('#'.basename(__FILE__).'#',$_SERVER['PHP_SELF'])) die();
   
       function fun_get_attachments( $args = array() ) {
       	global $post;
   
       	$defaults = array(
       		'post_parent' => 0,
       		'post_type' => 'attachment',
       		'post_mime_type' => 'image',
       		'orderby' => 'menu_order',
       		'order' => 'ASC',
       		'numberposts' => -1,
       		'meta_key' => '',
       		'meta_value' => '',
       	);
   
       	$args = wp_parse_args( $args, $defaults );
   
       	if ( !$args['post_parent'] )
       		$args['post_parent'] = $post->ID;
   
       	if ( !$args['post_parent'] )
       		return array();
   
       	// usual way to get pdf attached to this post
       	$legal_attachments = get_children( $args );
   
       	// FileUnattach way to get attachments
       	if ( class_exists( 'FileUnattach' ) ) {
       		$args['meta_key'] = '_fun-parent';
       		$args['meta_value'] = $args['post_parent'];
       		$args['post_parent'] = '';
   
       		$fun_attachments = get_posts( $args );
       	}
   
       	$attachments = array_merge( $legal_attachments, $fun_attachments );
   
       	// if there are elts in both arrays, then there must be some duplicates.
       	// remove those duplicates !
       	if ( !empty( $legal_attachments ) && !empty( $fun_attachments ) ) {
       		foreach ( $attachments as &$attachment ) {
       			$attachment = serialize( $attachment );
       		}
   
       		$attachments = array_unique( $attachments );
   
       		foreach ( $attachments as &$attachment ) {
       			$attachment = unserialize( $attachment );
       		}
       	}
   
       	if ( !$attachments ) {
       		return array();
       	}
   
       	return $attachments;
       }
       ?>
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[File Un-Attach] [Plugin: File Un-Attach] not sure that multiple attachments is working properly](https://wordpress.org/support/topic/plugin-file-un-attach-not-sure-that-multiple-attachments-is-working-properly/)
 *  [sebmeric](https://wordpress.org/support/users/sebmeric/)
 * (@sebmeric)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-file-un-attach-not-sure-that-multiple-attachments-is-working-properly/#post-2248991)
 * arg ! there is a typo and i cannot edit the post no more !
 * you have to replace `$post_parent` with `$args['post_parent']`
 * sorry…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[File Un-Attach] [Plugin: File Un-Attach] not sure that multiple attachments is working properly](https://wordpress.org/support/topic/plugin-file-un-attach-not-sure-that-multiple-attachments-is-working-properly/)
 *  [sebmeric](https://wordpress.org/support/users/sebmeric/)
 * (@sebmeric)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-file-un-attach-not-sure-that-multiple-attachments-is-working-properly/#post-2248990)
 * hi,
 * i also was looking for a way to attach a file to multiple posts and posts types.
   and for me also it wasn’t possible to retrieve these files in the posts where
   the library was saying the file was attached to… so i ended up to create a function
   that seems to work 🙂 here it is :
 *     ```
       <?php
       /*
       Plugin Name: File Un-Attach Helper Functions
       Plugin URI: http://www.xparkmedia.com
       Description: This function must be used to retrieve attachments added to multiple posts by File Un-Attach.
       Author: Sébastien Méric
       Version: 0.1
       Author URI: http://www.sebastien-meric.com
       Requires at least: 3.1.0
       Tested up to: 3.2
   
       Copyright 2010-2011 by Sébastien Méric http://www.sebastien-meric.com
   
       This program is free software; you can redistribute it and/or modify
       it under the terms of the GNU General Public License as published by
       the Free Software Foundation; either version 2 of the License,or
       (at your option) any later version.
   
       This program is distributed in the hope that it will be useful,
       but WITHOUT ANY WARRANTY; without even the implied warranty of
       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
       GNU General Public License for more details.
   
       You should have received a copy of the GNU General Public License
       along with this program; if not,write to the Free Software
       Foundation,Inc.,51 Franklin St,Fifth Floor,Boston,MA 02110-1301 USA
       */ 
   
       // Stop direct access of the file
       if(preg_match('#'.basename(__FILE__).'#',$_SERVER['PHP_SELF'])) die();
   
       function fun_get_attachments( $args = array() ) {
       	global $post;
   
       	$defaults = array(
       		'post_parent'    => 0,
       		'post_type'      => 'attachment',
       		'post_mime_type' => 'image',
       		'orderby'        => 'menu_order',
       		'order'          => 'ASC',
       		'numberposts'    => -1,
       		'meta_key'       => '',
       		'meta_value'     => '',
       	);
   
       	$args = wp_parse_args( $args, $defaults );
   
       	if ( !$args['post_parent'] )
       		$args['post_parent'] = $post->ID;
   
       	if ( !$args['post_parent'] )
       		return array();
   
       	// usual way to get pdf attached to this post
       	$attachments = get_children( $args );
   
       	// FileUnattach way to get attachments
       	if ( !$attachments && class_exists( 'FileUnattach' ) ) {
       		$args['post_parent'] = '';
       		$args['meta_key']    = '_fun-parent';
       		$args['meta_value']  = $post_parent;
   
       		$attachments = get_posts( $args );
       	}
   
       	if ( !$attachments ) {
       		return array();
       	}
   
       	return $attachments;
       }
       ?>
       ```
   
 * make a plugin/file-unattach-helper/file-unattach-helper.php file with this content
   the use something like this to get pdf attachments for exemple :
 * `$attachments = fun_get_attachments( array( 'post_mime_type' => 'application/
   pdf' ) );`
 * i hope this could help.
 * Séb.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WordPress.com Popular Posts] [Plugin: WordPress.com Popular Posts] container closing div missing when no top posts fetched](https://wordpress.org/support/topic/plugin-wordpresscom-popular-posts-container-closing-div-missing-when-no-top-posts-fetched/)
 *  Thread Starter [sebmeric](https://wordpress.org/support/users/sebmeric/)
 * (@sebmeric)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-wordpresscom-popular-posts-container-closing-div-missing-when-no-top-posts-fetched/#post-1992185)
 * oups 🙂 you’re right, that’s the right thing to do and, of course, it works !
 * thanx
 *   Forum: [Alpha/Beta/RC](https://wordpress.org/support/forum/alphabeta/)
    In 
   reply to: [Show Categories Filter on Custom Post Type List](https://wordpress.org/support/topic/show-categories-filter-on-custom-post-type-list/)
 *  [sebmeric](https://wordpress.org/support/users/sebmeric/)
 * (@sebmeric)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/show-categories-filter-on-custom-post-type-list/#post-1529839)
 * Thank you. Very interesting tutorial 🙂
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom Taxonomies Filter in manage posts](https://wordpress.org/support/topic/custom-taxonomies-filter-in-manage-posts/)
 *  [sebmeric](https://wordpress.org/support/users/sebmeric/)
 * (@sebmeric)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/custom-taxonomies-filter-in-manage-posts/#post-1722405)
 * Maybe you’ll find the answer to this question in this thread :
 * [http://wordpress.org/support/topic/show-categories-filter-on-custom-post-type-list](http://wordpress.org/support/topic/show-categories-filter-on-custom-post-type-list)
 * Hope this will help.
 *   Forum: [Alpha/Beta/RC](https://wordpress.org/support/forum/alphabeta/)
    In 
   reply to: [Show Categories Filter on Custom Post Type List](https://wordpress.org/support/topic/show-categories-filter-on-custom-post-type-list/)
 *  [sebmeric](https://wordpress.org/support/users/sebmeric/)
 * (@sebmeric)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/show-categories-filter-on-custom-post-type-list/#post-1529837)
 * This is perfect !
 * And you may even add to the $args array the ‘selected’ param to keep track of
   the searched term after page reload :
 * `'selected' => $_GET['your_custom_taxonomy']`
 * Thanx a lot for this piece of code 🙂

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/users/sebmeric/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/sebmeric/replies/page/2/?output_format=md)