Search Results for 'code'
-
Search Results
-
Hi! I’m trying to allow users to assign their topics to custom taxonomies from the front end bbpress topic form. I thought it would be cool to be allow users to sort topics in multiple ways, and not just the anarchy that comes with unhierarchical ‘tags’.
With a lot of searching on forums, I’ve managed to register the taxonomies, display them, include topics in the archives, and added inputs to the form to allow uses to select the relevant ones.
But I’m totally stuck with saving the value from the checkboxes. You can tick the box, but nothing is saved. I’m guessing I need to use wp_set_object_terms()? and hook into bbp_new_topic() to save the terms? But I have no idea how to save the value from the checkboxes in there.
Any ideas, tips, scorn, alternative suggestions are welcome. Do i need to learn more js and use AJAX to accomplish this? Or is this achievable with php and am I even close?
// Add custom taxonomies to topic form add_action ( 'bbp_theme_after_topic_form_content', 'bbp_extra_fields'); function bbp_extra_fields() { $value = get_post_meta( bbp_get_topic_id(), 'issue', true); echo '<div id="custom-meta">'; echo'<fieldset> <legend>Issues</legend>'; $issues = get_terms('issue', array('hide_empty' => 0)); foreach ($issues as $issue) { echo '<span><input type="checkbox" class="issue" for="issue" value="'.$issue->slug.'"></input><label>'.$issue->name.'</label></span>'; }; echo '</fieldset>'; $value = get_post_meta( bbp_get_topic_id(), 'region', true); global $region; $region = get_terms('region', array('hide_empty' => 0)); echo'<fieldset> <legend>Region</legend>'; $regions = get_terms('region', array('hide_empty' => 0)); foreach ($regions as $region) { echo '<span><input type="checkbox" class="issue" for="issue"value="'.$region->slug.'"><label>'.$region->name.'</label></span>'; }; echo '</fieldset></div>'; }; // Save the terms from the form add_action ( 'bbp_new_topic', 'bbp_save_extra_fields', 10, 1 ); add_action ( 'bbp_edit_topic', 'bbp_save_extra_fields', 10, 1 ); function bbp_save_extra_fields($topic_id) { $post_id = get_the_ID(); $category_id = $region->id; $taxonomy = 'region'; wp_set_object_terms( $post_id, intval( $category_id ), $taxonomy ); };
I would like to edit the wording of some of the bbPress prompts and messages. As I understand this can be done using a language file as described here.
https://codex.bbpress.org/getting-started/bbpress-in-your-language/I’m a little confused though since I am not actually changing from English to another language. Since I’m not changing languages what does the process look like? I went here to download the English version but there’s English (Canadian, UK, Australian, or South African versions) Which further ads to the confusion as to which language file I should download and edit 🙁
Any idea on how to go about editing the bbPress prompts and messages in the same language I am using?
https://translate.wordpress.org/projects/wp-plugins/bbpress/
Hello. I would like to remove the Edit Profile option from the user menu. I am already using a plugin for editing user fields. I already removed it by CSS:
.bbp-user-edit-link {
display: none!important;
}But for security, I need to completely remove this option.
Is there a code for this?
Thanks for your time.
Topic: BB Press and WP theme
Hello, I have installed BB press but my WP theme makes the font size very small.
Is there any way to cutomize the BB press Fourm? With another plug in? I know nothing about CSS but I know where to paste custom CSS codes…This is how it looks:
Topic: Shortcodes Forum
I know I can add ShortCodes to the pages, but can I add them in the forums section? I add and nothing happens
I set up my forums with the help of “bbp style pack”, but unfortunately had to deactivate it as it kept causing fatal errors stopping me from logging in, and sometimes throwing errors in admin panel. But now something weird has happened to the layout. It seems to be “double spacing” lines. I have removed bbpress and bbp style pack from the plugin area, and then reinstalled the plugins … but the same error persists.
I have looked at the code, and there doesn’t seem to be any clues; all entries are still within their
<ul id="bbp-forum-447" ... </ul> <p><!-- #bbp-forum-447 --></p>
So no clues there. Anyone any ideas?