Forum Replies Created
-
๐
In reply to: Customizing the bbPress login pagethat is not part of bbpress.
In reply to: hiding some items in forum & topic page2nd – works in my browser for your site – can you close and reopen and check again, or post a new image showing what is still wrong, and links to an exact example.
3rd – I don’t know what ‘no output results’ means ??? again it seems to have gone from your site in my browser.
I did see that I had not taken out the ‘author/posts’ from the footer – you can add this
.forums.bbp-replies li.bbp-footer { display: none; }
In reply to: Function to return all replies to a topicmy code above corrected works, but yes do come back and let us know if you find the problem or need further help
In reply to: hiding some items in forum & topic pageput 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.