Title: For custom posts?
Last modified: April 28, 2020

---

# For custom posts?

 *  Resolved [greg57](https://wordpress.org/support/users/greg57/)
 * (@greg57)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/for-custom-posts/)
 * Dear Jose,
    as I’m using a photography theme that makes ample use of custom posts(
   galleries, albums, collections) I was wondering if there was a way to make your
   plugin work with these. Best regards
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffor-custom-posts%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Jose Mortellaro](https://wordpress.org/support/users/giuse/)
 * (@giuse)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/for-custom-posts/#post-12742569)
 * Hi [@greg57](https://wordpress.org/support/users/greg57/)
 * officially as written in the plugin description this plugin doesn’t support custom
   post types, only posts and pages.
 * However, it is already prepared for future development.
 * If you feel confident adding custom PHP code, using this filter you can add whatever
   post type:
 *     ```
       add_filter( 'eos_scfm_post_types','my_custom_post_types',90,1 );
       function my_custom_post_types( $post_types ){
           $post_types[] = 'your_custom_post_type1_slug';
           $post_types[] = 'your_custom_post_type2_slug';
       	return $post_types;
       }
       ```
   
 * You should replace your_custom_post_type1_slug, your_custom_post_type2_slug …
   with the slugs of the post types you want to add.
 * To know the slug of your custom post types, go to the page in the backend where
   you see the list of your custom post types. You will see an URL that looks like:
 * [http://blog.gregorydziedzic.com/wp-admin/edit.php?post_type=your_custom_post_type_slug](http://blog.gregorydziedzic.com/wp-admin/edit.php?post_type=your_custom_post_type_slug)
 * Take the slug written after ?post_type=
 * There are not enough tests on the field with custom post types, so I can’t ensure
   all works for any kind of post type. I already know that for some custom post
   types it doesn’t work, but for most custom post types it should work.
 * To create the mobile version, you will have a button on the single post editing
   page.
    In the posts list in the backend, you will not see the icon “+” as for
   normal posts and pages, and you will not see the note “mobile” next to the mobile
   version. Instead of mobile, you will see “private”.
 * If you have a few cases, I suggest trying adding the code above. If you have 
   too many posts where you need the mobile version, maybe it will be a little uncomfortable
   for you.
 * In the future, the custom posts types will be supported, but it will take some
   time before to say it’s stable for all post types.
 * I hope it helps.
    -  This reply was modified 6 years, 1 month ago by [Jose Mortellaro](https://wordpress.org/support/users/giuse/).
 *  Thread Starter [greg57](https://wordpress.org/support/users/greg57/)
 * (@greg57)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/for-custom-posts/#post-12742717)
 * Hi Jose, thanks for your answer. For some strange reason I could read it in the
   email notification but it doesn’t appear in the forum.
 * For your information, I believe your plugin can be extremely valuable for photography
   websites. My use case is a theme (TwoFold) that allows the use of horizontal 
   scrolling for collection display. Looks great on desktop but it’s not user friendly
   AT ALL on mobile.
 * Concerning the php customization you mentioned, which file should the filter 
   be added to?
 * I would be very happy to beta test upcoming versions supporting custom post types.
 * Best regards
 * Grégory Dziedzic
 *  Moderator [tobifjellner (Tor-Bjorn “Tobi” Fjellner)](https://wordpress.org/support/users/tobifjellner/)
 * (@tobifjellner)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/for-custom-posts/#post-12742939)
 * > Hi Jose, thanks for your answer. For some strange reason I could read it in
   > the email notification but it doesn’t appear in the forum.
 * When a post/reply with log entries and/or several links is edited within a few
   minutes after being published, it every now and then pays a visit to the spam
   queue. But now the (edited) response is live again above.
 *  Plugin Author [Jose Mortellaro](https://wordpress.org/support/users/giuse/)
 * (@giuse)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/for-custom-posts/#post-12743080)
 * Hi [@greg57](https://wordpress.org/support/users/greg57/) you should add that
   code in functions.php of the child theme or in a custom plugin.
 * As I see on the page you shared, it looks you are not using a child theme.
    You
   could add it in functions.php of your theme, but it would not be a good idea 
   because you will lose it as soon as you update your theme.
 * Maybe you can use this tool to quickly create a custom plugin:
    [https://josemortellaro.com/wordpress-plugin-builder/](https://josemortellaro.com/wordpress-plugin-builder/)
 * Past the code in the field “PHP code” and click on “Create Plugin” after checking
   the agreement. Then click on “Download”. You will have a custom plugin ready 
   to be uploaded on your website and you will not lose the custom code with future
   theme updates.
 *  Thread Starter [greg57](https://wordpress.org/support/users/greg57/)
 * (@greg57)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/for-custom-posts/#post-12745729)
 * Thanks for all this. I’ve installed and activated your plugin and it seems to
   work for posts and pages. I’m now working on a child theme and have edited functions.
   php as I guess I had to but unfortunately it seems to be one of those cases where
   it’s not working at all 🙁
 * [https://www.dropbox.com/s/cudug7a6jrk710x/Capture%20d%27%C3%A9cran%202020-04-28%2018.07.10.png?dl=0](https://www.dropbox.com/s/cudug7a6jrk710x/Capture%20d%27%C3%A9cran%202020-04-28%2018.07.10.png?dl=0)
 * Unless I didn’t get it right. Here’s what my functions.php looks like:
 *     ```
       <php
       add_filter( 'eos_scfm_post_types','my_custom_post_types',90,1 );
       function my_custom_post_types( $post_types ){
           $post_types[] = 'gallery';
           $post_types[] = 'album';
           $post_types[] = 'collection';
       	return $post_types;
       }
       ```
   
 * have I missed something?
    -  This reply was modified 6 years, 1 month ago by [tobifjellner (Tor-Bjorn “Tobi” Fjellner)](https://wordpress.org/support/users/tobifjellner/).
      Reason: marked code as... code
 *  Moderator [tobifjellner (Tor-Bjorn “Tobi” Fjellner)](https://wordpress.org/support/users/tobifjellner/)
 * (@tobifjellner)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/for-custom-posts/#post-12745746)
 * The start flag for PHP should be
    `<?php`
 *  Thread Starter [greg57](https://wordpress.org/support/users/greg57/)
 * (@greg57)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/for-custom-posts/#post-12745831)
 * Yaaaaaaaaaaaay!!!
 * I love you all people this is awesome. Thanks to you Tobi and thanks to Jose 
   the creator of the awesome much-needed plugin.
 * Take care guys! 🙂
 *  Plugin Author [Jose Mortellaro](https://wordpress.org/support/users/giuse/)
 * (@giuse)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/for-custom-posts/#post-12747134)
 * You are welcome [@greg57](https://wordpress.org/support/users/greg57/) ! Thank
   you very much for your words.
    So you have solved, right? Can I close the thread?
 *  Thread Starter [greg57](https://wordpress.org/support/users/greg57/)
 * (@greg57)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/for-custom-posts/#post-12747535)
 * You’re very welcome. So far so good, go ahead, I’ll open a new one if I have 
   more questions later 😀
 *  Plugin Author [Jose Mortellaro](https://wordpress.org/support/users/giuse/)
 * (@giuse)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/for-custom-posts/#post-12747613)
 * Ok perfect. Yes, if you have questions, don’t hesitate to open a new thread.

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

The topic ‘For custom posts?’ is closed to new replies.

 * ![](https://ps.w.org/specific-content-for-mobile/assets/icon-256x256.png?rev=
   2447531)
 * [Specific Content For Mobile - Customize the mobile version without redirections](https://wordpress.org/plugins/specific-content-for-mobile/)
 * [Support Threads](https://wordpress.org/support/plugin/specific-content-for-mobile/)
 * [Active Topics](https://wordpress.org/support/plugin/specific-content-for-mobile/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/specific-content-for-mobile/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/specific-content-for-mobile/reviews/)

 * 10 replies
 * 3 participants
 * Last reply from: [Jose Mortellaro](https://wordpress.org/support/users/giuse/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/for-custom-posts/#post-12747613)
 * Status: resolved