Helpful doesn’t appear
-
Hello,
Buttons don’t appear on posts. All settings ok. Example page https://clck.ru/SUrLW
I checked all settings https://yadi.sk/i/cXKb6AHwzHGfzw (on the other site of mine same settings and everything is ok).
What it can be?
-
Sure, it was first I turned off.
Now it is disabled, but nothing changed((-
This reply was modified 5 years, 2 months ago by
Axelll.
Do you use the_content() in your posts ?
Helpful is only placed automatically if the posts also use the_content().
I took a look at your main theme (allium) once. Without any changes to the theme it should work. You are using a child theme though. I don’t know what your files look like.
You can also place the shortcode in a post [helpful].
If the shortcode works, it’s not Helpful, but your site.
Let me hear how it goes.
1) Shortcode is not working – I put it in widget and it looks like text [helpful] )))
2) We use get_the_content() in content-single.phpWidgets do not support shortcodes. Please place it in the content of a post that is also selected as a checkbox in the Helpful settings.
So post, page, media or similar.
I have ~3000 posts, how can I place it?)))
Are there any other decisions?-
This reply was modified 5 years, 2 months ago by
Axelll.
You should create a new post and place the shortcode once. This way we (you and i) can check if it’s Helpful or your site.
If the shortcode doesn’t work in ONE post either, then we’ll look further.
If this then works with the shortcode, you can use:
<?php echo do_shortcode( "[helpful]" ); ?>A shortcode with a specific post ID:
<?php echo do_shortcode( '[helpful post_id="POST_ID"]' ); ?>Just in case I can’t answer you anymore today, because I’m off work now.
It isn’t working with shortcode https://yadi.sk/i/AgWRsrYUk1nfnw
But it’s okay with this <?php echo do_shortcode( “[helpful]” ); ?> in content-single.phpAs for me it’ll be better to work with automatic insertion.
I think your problem is that you are using
get_the_content()but have not applied a filter so that the shortcodes are not converted.You can replace get_the_content() with the following things, so that shortcodes are also converted:
<?php echo apply_filters( 'the_content', get_the_content() ); ?>
<?php echo do_shortcode( get_the_content() ); ?>These are two possibilities. This is also how all shortcodes should be converted.
This only as an example. If this already works for you, it is excellent. Just remember to use
[helpful post_id="ID of the post"], if several posts are displayed on one page, so that Helpful always evaluates the correct post.Thank you so much! It’s working as well!
-
This reply was modified 5 years, 2 months ago by
The topic ‘Helpful doesn’t appear’ is closed to new replies.