ConiMoss
Forum Replies Created
-
Forum: Plugins
In reply to: [Site Reviews] How to check if the current post has reviews or notok, thanks again!
Forum: Plugins
In reply to: [Site Reviews] How to check if the current post has reviews or notBrilliant, thanks!
Got it working using this (in case anyone else needs this):
<?php $post_id = get_the_ID(); $reviews = glsr_get_reviews([ 'assigned_posts' => $post_id, 'status' => 'approved', // value can be "all", "approved", or "unapproved" ]); if($reviews->total > 0 ):?> YES <?php else: ?> NO <?php endif;?>
Thanks again for your time and effort, appreciate it!
Forum: Plugins
In reply to: [Site Reviews] How to check if the current post has reviews or notI’m trying this:
<?php $post_id = get_the_ID(); $review = glsr_get_review($post_id); if ($review != ''):?> YES <?php else: ?> NO <?php endif;?>
Regardless if the post has published reviews or not, it still says ‘YES’.
can you please help me..
thanks.
Forum: Plugins
In reply to: [Site Reviews] How to check if the current post has reviews or notHi, yes, I understand, I can see that.
that text was just an example…
I want to show a different text.
Basically I need a PHP code that checks if the current post has post type ‘site-review’ reviews, then do this, if no, then do this.
I have tried disabling all of my plugins.
Still the same.
Haven’t tried switching to the default theme.
I’m not saying that it is the plugin’s problem..
It could be my theme. And probably is.
But even if it’s working on a default one, I won’t be able to re-code my whole website.
I’m using Simplest theme. I built everything from scratch.
I will reach you through the form.
Yeah, I have included just once.
Still the same.
Is it possible to share my website without publicly being seen here?
Or should I email you to your support form?
I will send you two urls.
One Homepage (Front Page).
And other Help page.No need to be logged in.
You could quickly take a look at the source and check, maybe there’s something wrong with the one that’s not set as a Front Page.
- This reply was modified 3 years ago by ConiMoss.
Yes,
I have even added before and after the chat so that it’s 100% included:
<script type="text/javascript" src="./wp-content/plugins/simple-ajax-chat/resources/sac.php?ver=20210210"></script> <?php if (function_exists('simple_ajax_chat')) simple_ajax_chat(); ?> <script type="text/javascript" src="./wp-content/plugins/simple-ajax-chat/resources/sac.php?ver=20210210"></script>
Checked the source code. It shows that the JavaScript is in fact included.
But still getting an error when trying to type something…
Ok, so a naked shortcode inside a post does work.
No errors.
So the problem is when it’s inside a template file.
Just to clarify.
I use page-mypagename.php that I upload to my theme directory.
Then I create a Page named mypagename.
And I access it with https://www.mywebsite.com/mypagenameAnd I add your
<?php if (function_exists('simple_ajax_chat')) simple_ajax_chat(); ?>
inside it.I do this for my all pages.
But as mentioned, it displays on all of them, but types a message without an error only on the one which is set as a Front Page.
Pardon, I meant displaying.
The chat is displaying on all pages, however it only works without an error:
WP Plugin SAC: Name and comment required. Please complete all required fields and try again.
on a page that I set to be as a Front Page.
I will try to add the naked shortcode in a post through editor, will let you know the results.
Sorry for wasting your time, Jeff.
Really want this to work.
There’s no alternatives to your SAC plugin.
I have changed the “Front Page” to other Page (with chat) and it does work.
So it seems that the chat is working only on a page that is set to Front Page.
that’s weird.
Does the plugin somehow recognize that the page is set to Front Page and only show on this one?
Maybe there’s a line in code that I need to change.
Desperately want this to work ??
- This reply was modified 3 years ago by ConiMoss.
I think the worst case scenario, I will have to iframe it from the homepage.
Which is a bit hassle to load the page twice.
Have no other solution.
Sad.
Hey Jeff,
yes, Chat URL is empty.actually, I removed the script from the header, and it’s still working fine on the front page.
But not on others…
It’s weird, how can it work on front page and not on other pages.
I have seen other SAC users had the same issue…
Any thoughts?
If it was theme or plugin issue, I guess it wouldn’t even work on the front page, right?
So it’s something else I guess?
I really love this plugin, in fact I’m ready to donate, and I want it to work.
I do know a bit of coding so my logic is this:
If it works on the front page (which is a page that is set as front page on WP “Reading” settings), I assume the plugin has a code to work on the “front page”.
I’m sure there has to be a way to make the plugin work on other pages as well?
need help.
I have added in the Settings > USP Pro:
Selected CSS/JS tab.
Pasted the code in the “Custom JavaScript” field.
but it didn’t added.
Maybe I pasted in the wrong place?
cool, just sent you.