Possibly lots of things.
I appreciate that you English may not be good, but can you explain in more detail what you are trying to do?
Also
1. php won’t work in a page without a plugin
2. there is no shortcode display_forum
2. normally you’d use
[bbp-single-forum id=$forum_id]
in a page and in php you’d use
echo do_shortcode( ‘[bbp-single-forum id forum id =”5”]‘ );
Hi, Robin!
I want to replace on the page comment form on the relevant topic in the forum. To do this, on each page I create a custom field in which prescribe ID created threads.
echo do_shortcode( ‘[bbp-single-forum id forum id =”custom_field”]‘ );
does not work.
sorry but what is the ‘page comment form ‘, where on ‘each page’ are you putting the code, and what is ‘each page’
I am trying to hep you, but you do need to do a detailed response so that I can help.
For instance
” I go into dashboard and select forums and then edit the xx forum and change the content from … to….”
or
‘I edit the page.php file and in line xxx I add YYY’
I installed the plugin Easy digital downloads that creates custom record types post_type = download. I edited single.php file removed <? Php comments_template ();?> And I want to insert the code to show the theme of the forum bbpress renamed to the new file single-download.php
In the custom field on the product page I insert ID Forum.
ok, well without spending hours recreating your issue, I’d suggest you try
<?php
$idbbp = get_post_meta($post->ID, 'idbbp', true);
$forum_id = bbpress()->current_forum_id = $idbbp;
$x='[bbp-single-forum id forum id ="'.$forum_id.'"]‘ ;
echo do_shortcode( $x);
Oh great, Robin. It works for me. Thank you very much!
<?php
$idbbp = get_post_meta($post->ID, 'idbbp', true);
$forum_id = bbpress()->current_forum_id = $idbbp;
$x='[bbp-single-topic id ="'.$forum_id.'"]';
echo do_shortcode($x);
?>
Great – glad you’re fixed !!