Forum Replies Created
-
In reply to: hiding some items in forum & topic page
put this in the custom css of you theme
div.bbp-template-notice.info { display: none; } .bbp-pagination-count { display: none; } .forums.bbp-replies li.bbp-header { display: none; }
In reply to: Customizing the bbPress login pageok, based on that I have no idea what you mean by embedding.
bbpress does not have a ‘login page’ it has shortcodes and widgets.
the template used by bbpress for login is
bbpress\templates\default\bbpress\form-user-login.php
to customise :
find
wp-content/plugins/bbpress/templates/default/bbpress/form-user-login.phptransfer this to your pc and edit as desired
and save
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpresswhere %your-theme-name% is the name of your theme
Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
wp-content/themes/%your-theme-name%/bbpress/form-user-login.phpbbPress will now use this template instead of the original
In reply to: Customizing the bbPress login pageIn reply to: Customizing the bbPress login pagethere are also lots of login customization plugins which may do what you want a whole lot easier
eg
In reply to: Customizing the bbPress login pagethat is a page full of code – so what did you put in?
In reply to: Customizing the bbPress login pagePut this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
In reply to: hiding some items in forum & topic pageI would need a link to live examples to give you css – many things affect what classes are being used and you site might well be different to mine.
In reply to: Function to return all replies to a topicdid you correct the error in this line
if (!empty ($topic) {
should be
if (!empty ($topic)) {
In reply to: Function to return all replies to a topicif title is unique then
untested but something like :
function rew_find_topic_id ($title) { $topic = get_page_by_title($title, OBJECT, bbp_get_topic_post_type()); if (!empty ($topic) { $topic_id = $topic->ID ; return $topic_id ; } else { return 'empty' ; } }
In reply to: Function to return all replies to a topiconly if you have one topic with that title, and since you cannot control what users title their topics this cannot be guaranteed.
You could return an array of topic ID’s that match the title, but not sure how much that would help.
what are you trying to achieve?
In reply to: Notify admin when replies are pendingonce activated go to
dashboard>settings>bbp style pack>Moderation
This will let you set options
In reply to: Show topic & reply count on user admin screen?🙂
In reply to: Connexion ACF & BBPress Front EndI presume you have raised this on the ACF site?
In reply to: Function to return all replies to a topictitles can be duplicated – eg you can have 2 topics called say ‘help’
the title will be the same, but the permalinks will be
forums/topic/help/
and
forums/topic/help-2/so there is no title to id function
In reply to: Function to return all replies to a topic🙂
In reply to: Function to return all replies to a topicyes
$replies = bbp_has_replies( $args );
in \bbpress\includes\replies\template.php
it has these default args (some set by code above this section)
$default = array( 'post_type' => $default_post_type, // Only replies 'post_parent' => $default_post_parent, // Of this topic 'posts_per_page' => bbp_get_replies_per_page(), // This many 'paged' => bbp_get_paged(), // On this page 'orderby' => 'date', // Sorted by date 'order' => 'ASC', // Oldest to newest 'hierarchical' => $default_thread_replies, // Hierarchical replies 'ignore_sticky_posts' => true, // Stickies not supported 'update_post_term_cache' => false, // No terms to cache
but whatever you pass in $args will overwrite these
🙂
This is one of the new FSE themes, so you need a fix to work with bbpress.
install
once activated, navigate to
dashboard>settings>bbp style pack, and you should see the first tab called ‘Theme Support’ – if you don’t see this, come back.
In that tab, select
Enable Theme Support
and save
The forums should then display
what theme are you using?
In reply to: Auto close topic after some time / daysI can only say try it – sorry I am limited in time I can give free to things 🙂
keep playing and you should be able to work it out.
Otherwise would be paid effort – contact me via http://www.rewweb.co.uk/contact-me/
In reply to: Auto close topic after some time / daysok, so delete the previous code and put this code instead
function bbpress_close_old_topics() { // Auto close old topics $topics_query = array( 'author' => 0, 'show_stickies' => false, 'parent_forum' => 'any', 'post_status' => 'publish', 'posts_per_page' => -1 ); if ( bbp_has_topics( $topics_query ) ) while( bbp_topics() ) { bbp_the_topic(); $topic_id = bbp_get_topic_id(); $topic_date = strtotime( get_post( $topic_id, 'post_date', true ) ); $forum_id = bbp_get_topic_forum_id($topic_id); if ($topic_date < strtotime( '-2 hours') ) // && $forum_id == 1276 ) bbp_close_topic( $topic_id ); } }
In other words we take out the cron scheduling functions from the code
then
Event type: PHP cron event
Hook name: bbpress_close_old_topics
arguments: none
next run: now
repeat: hourlyThat should do it, you should see it as an event.
If you have a topic already set to expire, it should do so immediately as you have schgeduled to run ‘now and then every hour’ in the above.
In reply to: Auto close topic after some time / daysyes try that
In reply to: Auto close topic after some time / daysIn reply to: Auto close topic after some time / daysa cron event only runs at the interval specified, so the check event runs once a day ie
wp_schedule_event(time(), 'daily', 'bbpress_daily_event');
so would only close topics older than 2 hours once a day.
suggest changing that line to
wp_schedule_event(time(), 'hourly', 'bbpress_daily_event');
so it would run every hour, so topics would be closed between 2 and 3 hours depending on when cron runs in relation to their creation.
In reply to: seeking for ability to print a whole thread@taliabarlev solution beyond free help, but contact me via