Search Results for 'test'
-
Search Results
-
I have searched and put code together and tested. Now whenever a new post is created in WordPress a new topic is created in a specific sub-forum on my bbPress. This is working great. It brings over the tags and everything.
The one problem I have is that the publish_post action fires every time a post is set to published. So if a post gets set back to draft or pending review, and then published again, another forum topic is created. There are problaby 2097324907629306 ways this can be solved. I am only coming up with some pretty stupid ones I think, so I was hoping someone might have a good idea here.
Here is the code for your functions.php:
function post_published_create_topic( $ID, $post ) { $author = $post->post_author; $name = get_the_author_meta( 'display_name', $author ); $title = $post->post_title; $permalink = get_permalink( $ID ); $excerpt = $post->post_excerpt; $subject = sprintf( '%s: %s', $name, $title ); $message = sprintf ('[b]%s[/b]' . "\n" . 'By %s' . "\n\n" . '[i]%s[/i]' . "\n\n" . 'View: %s' . "\n\n", $title, $name, $excerpt, $permalink ); $tags = wp_get_post_tags( $ID, array( 'fields' => 'names' ) ); $new_post = array( 'post_title' => $subject, 'post_content' => $message, 'post_parent' => 691, 'post_status' => 'publish', 'post_type' => 'topic' ); $topic_meta = array( 'forum_id' => $new_post['post_parent'] ); $topic_id = bbp_insert_topic($new_post, $topic_meta); $term_taxonomy_ids = wp_set_object_terms( $topic_id, $tags, 'topic-tag' ); } add_action( 'publish_post', 'post_published_create_topic', 10, 2 );
Take that code and put it in your themes functions.php (hopefully you are using a child theme.) The 691 is my sub-forums ID, replace that with the right ID for yours. The format of the post and its content is done on the line that starts “$message = sprintf”.
Now I just need to get it to stop creating a new post every time the same post is published. So far my ideas have been something like matching up the topics title with a string comparison, but that seems a bit heavy. There should be a simpler way and I am just not seeing it right now.
Hi Am not sure where my other 2 posts went, have posted twice with code, maybe that is the problem the code. My problem is that the replies to topics appear empty.
Am using wordpress 4.2, bbpress latest version as just updated to see if that might be the problem
ANY help wold be greatly apreciated
forum:
http://photohunters.org/forum/members-blog/
reply:
http://photohunters.org/topic/shutter-speed-cheat-sheet/#post-666Thank you Melanie
Topic: Latest author reply avatar
Topic: Crooked User names & roles
Hello, I’m currently testing out a forum that I’m creating, and find that labels are not appearing evenly. It is hard to explain, so let me show. The forum is at: http://www.eyeondemand.com/forums/topic/kindle-fire/
Or, as you can see by the image below, the names and roles appear crooked on all but the first post.
What could be causing this?
Hello, I’m testing out a new forum here: http://www.eyeondemand.com/forums and unfortunately the email subscriptions don’t seem to be working. Emails work with my website (for new registrations, etc), but the forum subscriptions don’t?
Any ideas?
We just recently started using BBPress a few weeks ago, and I will admit, I am a fitness blogger, not a programmer. A lot of what I have done has been purely due to research. I can usually get over the hump, but now I am not so sure. On my site, I began a few test topics on the forum just to see how things looked with the theme that we were choosing, and so far, so good. That was until I logged in as a subscriber/participant and tried to respond to the topic that I had already started and nothing showed up. I looked everywhere for that reply, but it was nowhere to be found. Then I tried replying again. And again. And again. And still nothing. So then I logged back into my administrator account, and I noticed a notification that told me that I had ONE reply. When I click on the notification to see the reply, nothing showed up. It simply took me to the original topic which (according to the listing) only had ONE VOICE. Which was the topic itself. Forget all of the half dozen times that I tried to reply to that thing. I tried searching for a solution in this forum, and where I found some similar circumstances, nothing else panned out. So here we are. I will provide the link to the forum and topic and question and I will let you decide: Am I missing something? Am I a total idiot? Lol. Seriously. Because I am starting to think I am going insane.
Here is the link. Check it out: http://www.thefitnotes.com/forums/topic/eat-right-eat-light/
Please let me know what I should do. Thanks
-FNG
Hey all,
I’m working on my first website and I have been making pretty good progress….I installed the bbPress forum plugin (latest version) and it integrated pretty easily into my theme (Sento Pro). Can somebody tell me how to turn off the page into bar on the forum? I can easily turn them off on pages by simply going to the page of interest and clicking disable page intro. There are no such options for forums….
Thanks for your help in advance….
Jay
Gud day all,
I noticed thread Created with bbprrss Forum on my wordpress don’t appear on the LATEST POST in the site index.Pls what did i need to do to set dis up.?
Your respond is highly appreciatedWhen I edit a reply I get a white screen with a 500 error code. Refreshing the page brings the reply back up just fine.
Running on a dedicated server with plenty of memory, tested with multiple themes, including twenty fifthteen, and even made sure the wordpress memory was increased in the wp-config.php file.
Anything else I can do to get rid of this issue?