Search Results for 'test'
-
Search Results
-
When I activate the latest bbPress (2.5.8) or SimpleRestrict (1.0.2) plugin then try to login to my site, the WordPress dashboard does not open. Instead, I simply get the home page of the site.
To deactivate these plugins, I have to go to my site files, rename the “plugins” folder, sign in to the site (the Dashboard appears) then reactivate my plugins other than bbPress and SimpleRestrict. Signing out, then signing in shows me the Dashboard. I have repeated this procedure about 3 times with the same result. The site is http://ruralpolicy.ca.
If I activate bbPress (in order to use the Forums option), the site seems to work okay, but I can’t log in to the Dashboard.
I recently redefined the site address URL and it seemed to make the necessary changes to the shortlinks okay. I can’t be sure, but this bbPress-Dashboard problem appeared around the time I made this change.
I’m using the Twenty-ten theme with a child.
Any suggestions what the problem might be?
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