Site logo

[Support request] Help with a plugin

Home Forums Support [Support request] Help with a plugin

Home Forums Support Help with a plugin

Viewing 11 posts - 16 through 26 (of 26 total)
  • Author
    Posts
  • #979988
    David
    Staff
    Customer Support

    Thats correct – delete the old one.

    // means a comment – so it won’t be executed in the code – you can delete that one if you want.

    #979997
    Charalambos

    Tried that but it doesn’t work either.

    #979999
    David
    Staff
    Customer Support

    Sorry you will need to get some feedback from the developer.

    #984180
    Charalambos

    Hello,

    I received an answer from the plugin developer. Here it is below,

    “I had a quick look at that thread, and I can guarantee you 10000% that the plugin’s code works well. Of course you need to be inside the WordPress post loop to access $post, which depends on the theme’s hook location. So even though the “hi” appears, if there is no valid post id, then of course the plugin can’t output anything.

    All you need to add is this inside a hook that has the post id available or says:

    global $post;

    And then below all you need is this:

    if ( class_exists( ‘Lets_Review_API’ ) ) {
    echo Lets_Review_API::lets_review_get_score_box( $post->id );
    }

    I have no idea why they are saying to add empty code like this though:

    else {
    // do nothing
    }

    it doesn’t truly make a difference, but it’s really not needed either, so just use what I put above.”

    #984419
    Tom
    Lead Developer
    Lead Developer

    There were some funky characters in the function David provided. I just edited it to remove them: https://generatepress.com/forums/topic/help-with-a-plugin/#post-979787

    Can you give it another shot?

    The hook is indeed inside the loop.

    #984626
    Charalambos

    Thanks Tom. It works.

    https://imgur.com/csWzVij

    Now i would like to move it as a small box on the top right of the featured image, just like their demo page below. (box background color: #ff0f4f, overall rating and stars color: white)

    https://imgur.com/3Vgbjiu

    #984676
    David
    Staff
    Customer Support

    Something as simple as that 🙂 Tom has a good eye for this.
    I just checked your site, and i can’t see the review box, can you share a link where i can see that?

    #984919
    Charalambos

    Hello David,

    I activated the element, so you can see it now.

    #985151
    David
    Staff
    Customer Support

    Try this CSS:

    .generate-columns .inside-article {
        position: relative;
    }
    
    .generate-columns .inside-article .lets-review-ext-5 {
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
        width: 90px;
        height: 90px;
        color: #fff;
        background-color: #ff0f4f;
        position: absolute;
        top: 0;
        right: 0;
    }
    #985435
    Charalambos

    Thanks David and Tom, it works perfect.

    Your support is out of this world!

    #985551
    David
    Staff
    Customer Support

    Awesome – we’re glad to be of help.

Viewing 11 posts - 16 through 26 (of 26 total)
  • You must be logged in to reply to this topic.