Title: Two things missing
Last modified: August 22, 2016

---

# Two things missing

 *  [Juergen Schulze](https://wordpress.org/support/users/1manfactory/)
 * (@1manfactory)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/two-things-missing/)
 * Nice work. But I can’t use it. Why not?
    1. It does not support custom post types.
   2. I don’t see a function where I can just get the HTML of the related links.
   wp_related_posts() immediatly posts the results.
 * [https://wordpress.org/plugins/wordpress-23-related-posts-plugin/](https://wordpress.org/plugins/wordpress-23-related-posts-plugin/)

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

 *  [PetraP](https://wordpress.org/support/users/petrap/)
 * (@petrap)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/two-things-missing/#post-5478855)
 * Hey Juergen,
 * thanks for reaching out!
    1. Well to be honest the first one is doable – example
   for custom post type (‘petra_product’):
 *     ```
       add_action( 'init', 'create_post_type' );
       function create_post_type() {
       register_post_type( 'petra_product',
       array(
       'labels' => array(
       'name' => __( 'Petra' ),
       'singular_name' => __( 'Petra' )
       ),
       'public' => true,
       'has_archive' => true,
       )
       );
       }
       ```
   
 * And then all you have to change is the init.php file of the plugin like so (just
   added the || ‘petra_product’ after ‘post’ ):
    `if ($content != "" && $post->post_type
   === 'post' || 'petra_product' && (($options["on_single_post"] && is_single())
   || (is_feed() && $options["on_rss"])))`
 * 2. What exactly are you trying to achieve?
 * Looking forward to your reply,
    Petra
 *  Thread Starter [Juergen Schulze](https://wordpress.org/support/users/1manfactory/)
 * (@1manfactory)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/two-things-missing/#post-5478876)
 * Thanks for your answer.
    I have been programming around with wordpress for quite
   a while now. And one thing I will NEVER ever do again: touch other peoples plugins
   or themes you use. Why not? Because with the next update your changes will be
   overwritten. And one is for sure: you will never be able to remember everything.
   That’s why I am putting everything customized in my own plugin for that project.
   And that’s why I also need the pure HTML result of a function to wrap it inside
   my own content filter. Juergen

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

The topic ‘Two things missing’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-23-related-posts-plugin_7b9a7c.
   svg)
 * [WordPress Related Posts](https://wordpress.org/plugins/wordpress-23-related-posts-plugin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-23-related-posts-plugin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-23-related-posts-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-23-related-posts-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-23-related-posts-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-23-related-posts-plugin/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Juergen Schulze](https://wordpress.org/support/users/1manfactory/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/two-things-missing/#post-5478876)
 * Status: not resolved