• Resolved teracomp

    (@teracomp)


    I’m trying to use YASR for a custom post type (Download Monitor, dlm_download).
    The cpt displays the content, but not the shortcode.

    My #1 goal is to have this applied using a function like:

    function add_visitor_vote( $content ) {
      global $post;
      if ( $post->post_type == 'dlm_download' ) {
        $content .= do_shortcode('[yasr_visitor_votes size="small"]');
      }
      return $content;
    }
    add_filter( 'the_content', 'add_visitor_vote' );

    But it won’t even work with [yasr_visitor_votes size=”small”] in the content field.

    I’ve disabled my function and tried the incognito window idea you posted in another response. Still no stars.

    https://www.ads-software.com/plugins/yet-another-stars-rating/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter teracomp

    (@teracomp)

    Update: I’m using an Extension to Download Monitor called Page. This provides the a search capability, so it’s required given the number of downloads I will have.

    Anyway, the add_filter method works when I call the download monitor shortcode on a page ([download id=NNN]), but it does not work on the results page.

    Bottom line, I don’t think this is your issue, but I’ll leave this here while I wait on DLM’s response just in case you’ve seen this before.

    Thanks for your time.

    Plugin Contributor dudo

    (@dudo)

    Hello teracomp, thank you for using Yasr!

    In the yasr settings, try to select “yes” at this question:

    Show “Visitor Votes” in Archive Page?

    Thread Starter teracomp

    (@teracomp)

    Perfect! That was the secret setting.
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Not showing in Custom Post Type’ is closed to new replies.