The effects of alcohol on
sustanon 250 leucine for β real weight loss & bodybuilding benefits?
Limited Support
Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.
We appreciate your patience and understanding while our team is away. Thank you for being part of the wpDiscuz community!
Merry Christmas and Happy Holidays! π
[Solved] Include post title in comment join text
How-to and Troubleshooting
(@jave)
Eminent Member
Joined: 4 years ago
Hello,
Β
is there a way to include the post title inside the comment join text (the placeholder)?Β
Β
I would like to change it dynamically according to the current post to something like:
Β
"What are your thoughts about 'post title' ?"Β
Β
Maybe this is archivable with a simple snippet?Β
Β
Thanks in advance.Β
(@jave)
Eminent Member
Joined: 4 years ago
Got it working with this:
Β
add_filter("wpdiscuz_phrase", function ($phrase, $key, $args) {
if ($key === "wc_comment_join_text") {
$title = get_the_title(get_queried_object_id());
$phrase = str_replace("Kommentar", "What are your thoughts about $title ?" , $phrase);
}
return $phrase;
}, 10, 3);
Β
But now there results another question out of it: As the placeholder is the same like in reply to textarea it doesn't fit anymore. How can I hide the placeholder only in reply to form but keep it in the main comment form?
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8205
Apr 11, 2022 7:39 am
@jave,
You can use the CSS code:Β
#wpdcom form.wpd_comm_form.wpd-secondary-form-wrapper .ql-editor::before{
display: none;
}
Put the code in the Top Admin Bar > Customize > Additional CSS > "Additional CSS" textarea, save it, delete all caches and check again.
(@jave)
Eminent Member
Joined: 4 years ago
Thanks, working! Last question: Is it also possible to change the submit button text only for replies?
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8205
Apr 11, 2022 10:40 am
@jave,
You should use some JS code like this:Β
jQuery(document).ready(function(){
jQuery('#wpdcom #wpdiscuz_hidden_secondary_form input[type="submit"]').attr("value", "Your text");
});
This article should be helpful for you: https://www.collectiveray.com/add-javascript-to-wordpress
Change the red marked value as you like.Β
(@jave)
Eminent Member
Joined: 4 years ago
Great, thanks alot. Everything solved! π