• Resolved dujames88

    (@dujames88)


    Hi,

    As you can see the Latest Review block is correctly displaying the link to the assigned page. However, I’d like to also display a link to the parent page beside this. Is there a way to do this? Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter dujames88

    (@dujames88)

    I also have another question about refreshing page. Should I post that here or make a new topic?

    Plugin Author Gemini Labs

    (@geminilabs)

    Have you tried this (assuming that the review form is displayed on the assigned page, and that the assigned page is a child of the parent page you want to assign to):

    [site_reviews_form assigned_posts="post_id,parent_id"]

    Plugin Author Gemini Labs

    (@geminilabs)

    Is your other question related to this?

    Thread Starter dujames88

    (@dujames88)

    Hi,

    Thanks for your response! I just tried your solution for question 1, but the Latest Review block is still not displaying the name of the parent page beside the assigned page.

    As regards 2, I’ll just type it out and it can be moved to a new post if necessary:

    I’ve tried three different ways to reload the page after form submission but I can’t get it to work.

    Method 1:
    Adding this to functions.php:

    add_action(‘site-reviews/review/created’, function ($review, $command) {
    header(“Refresh:0″);
    exit;
    }, 10, 2);

    Result: Submit button spins.

    Method 2.
    Adding this javascript to footer with Astra (theme) Hooks:

    document.addEventListener(‘site-reviews/after/submission’, function (event) {
    if (false !== event.detail.errors) return; // stop if there were errors
    location.reload(true); // reload the page from the server instead of the browser cache.
    });

    Result: prints this literally to footer.

    Method 3.

    add_action(‘site-reviews/review/created’, function ($review, $command) {
    echo ‘<script type=”text/javascript”> location.reload(true); </script>’;

    }, 10, 2);

    Result: Submit button spins.

    Any suggestions?

    Plugin Author Gemini Labs

    (@geminilabs)

    Method 2 should work. It’s a javascript snippet, so you will probably need to use a plugin like Custom CSS and JavaScript to add it to your site.

    Thread Starter dujames88

    (@dujames88)

    Hi,

    Thanks for your reply! I’ve tried this solution with 3 different javascript snippet plugins as well as in functions.php and it’s still not working :(. Any other ideas? Also, do you have a solution for question 1? Thanks again for your time.

    Thread Starter dujames88

    (@dujames88)

    Hi, I’ve got the second issue sorted now (can add for others if curious) but could still really use help with first issue. If you could point me in the direction of which file I need to edit for the display of the Latest Review block would be great ??

    Plugin Author Gemini Labs

    (@geminilabs)

    but could still really use help with first issue.

    I explained how to do that here: https://www.ads-software.com/support/topic/display-parent-page-title-with-summary/#post-15461801

    To display a link to the parent page in each review, you need to assign reviews to the parent page as well as to the current page.

    Thread Starter dujames88

    (@dujames88)

    Fantastic, I owe you a beer, please send a link to your kofi page or whatever!!! Is there any way to change the sentence it displays? I.e.:
    “Review of Amsterdam and ‘t Stekkie”
    to
    “Review of ‘t Stekkie, Amsterdam”

    Thread Starter dujames88

    (@dujames88)

    Got it sorted in PHP, thanks again. I’d still like to buy you a beer/coffee for this fantastic plugin.

    Plugin Author Gemini Labs

    (@geminilabs)

    Got it sorted in PHP, thanks again.

    Great! There is a donate button on the plugin page which you can use if you like, thanks.

    Thread Starter dujames88

    (@dujames88)

    Done ??

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Display Parent page title with summary’ is closed to new replies.