• Resolved morgao

    (@redb68)


    Hi Blaz
    Is there a way to put the rating system in a custom post type (like recipe) ? Or another way with a shortcode ? I dont found it. Anyway your plugin is a top ! many thanks and take care

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Blaz K.

    (@blazk)

    Hi @redb68,

    thanks for your kind words 🙂 The rating system works with custom post types but at the moment there is no way to include the rating/results widget automatically in custom post types. Nevertheless, you can include them with the shortcodes [ratemypost] and [ratemypost-result]. If this sounds like too much work you can also include the rating widget directly in the template with the following code:

    
    <?php echo do_shortcode('[ratemypost]'); ?>
    

    The meta box (manipulating votes from the backend) is supported for custom post types since 1.1.3. I have “better compatibility with custom post types” on my to do list and will be added in one of the following versions 🙂 So, you will be able to automatically include the rating system in custom post types.

    Blaz

    Thread Starter morgao

    (@redb68)

    You know what ? i’m happy !
    many many thanks guy ! Take care

    • This reply was modified 7 years, 4 months ago by morgao.

    Hello, thanks for the great plugin, I also have the same problem with custom posts.
    I did not understand where I would include<? Php echo do_shortcode ('[ratemypost]'); ?> but if you make sure that with a next version they will be manageable then I use a widget and wait.
    Do you have any idea of ​​the times?
    For now, thank you

    Plugin Support Blaz K.

    (@blazk)

    Hi @fabriziof,

    It is in my plan to release an update for better compatibility with custom post types in February. I will keep you updated.

    As for the code above, you should add it to the custom post type template. You can read more about custom post type templates here:
    https://developer.ww.wp.xz.cn/themes/template-files-section/custom-post-type-template-files/

    So, if you have a custom post type “book” you should add the code to single-book.php in your theme’s folder.

    Blaz

    perfect, I created my page and I inserted it but it always appears after the plugins that follow in content
    For now it’s okay so I hope that after you can place before the posts connected

    <div class="post-content">
    				<?php the_content(); ?>
    				<?php echo do_shortcode('[ratemypost]');  //FABRIZIO PER RECENSIRE LA FAQ  ?>
    				<?php fusion_link_pages(); ?>
    				
    </div>

    https://www.businesscube.it/domande/messaggio-di-log-l-iban-non-e-indicato-nel-modo-corretto/

    Plugin Support Blaz K.

    (@blazk)

    @fabriziof I’m happy to hear that you managed to add the widget in custom post type. If more plugins use the_content filter, the order of their outputs depends on the priority set in the add_filter function in each of the plugins. I’ll check out what can I do about the priority – maybe an option to set it. I’ll keep you updated on this.

    Plugin Support Blaz K.

    (@blazk)

    @redb68 and @fabriziof I added an option to automatically insert the rating/result widget to custom post types in version 2.0.0 which has just been released.

    Blaz

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

The topic ‘Custom Post Type’ is closed to new replies.