Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 1,501 through 1,525 (of 13,920 total)
  • @robin-w

    Moderator

    ๐Ÿ™‚

    @robin-w

    Moderator

    that is not part of bbpress.

    @robin-w

    Moderator

    2nd – 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;
    }

    @robin-w

    Moderator

    my code above corrected works, but yes do come back and let us know if you find the problem or need further help

    @robin-w

    Moderator

    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;
    }

    @robin-w

    Moderator

    ok, 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.php

    transfer 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%/bbpress

    where %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.php

    bbPress will now use this template instead of the original

    @robin-w

    Moderator

    @robin-w

    Moderator

    there are also lots of login customization plugins which may do what you want a whole lot easier

    eg

    10 Best Custom Login Page Plugins for WordPress 2022

    @robin-w

    Moderator

    that is a page full of code – so what did you put in?

    @robin-w

    Moderator

    Put 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

    Code Snippets

    @robin-w

    Moderator

    I 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.

    @robin-w

    Moderator

    did you correct the error in this line

    if (!empty ($topic) {

    should be

    if (!empty ($topic)) {

    @robin-w

    Moderator

    if title is unique then

    get_page_by_title()

    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' ;
    	}
    }

    @robin-w

    Moderator

    only 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?

    @robin-w

    Moderator

    bbp style pack

    once activated go to

    dashboard>settings>bbp style pack>Moderation

    This will let you set options

    @robin-w

    Moderator

    ๐Ÿ™‚

    @robin-w

    Moderator

    I presume you have raised this on the ACF site?

    @robin-w

    Moderator

    titles 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

    @robin-w

    Moderator

    ๐Ÿ™‚

    @robin-w

    Moderator

    yes

    $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

    @robin-w

    Moderator

    ๐Ÿ™‚

    @robin-w

    Moderator

    This is one of the new FSE themes, so you need a fix to work with bbpress.

    install

    bbp style pack

    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

    @robin-w

    Moderator

    what theme are you using?

    @robin-w

    Moderator

    I 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/

    @robin-w

    Moderator

    ok, 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: hourly

    That 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.

Viewing 25 replies - 1,501 through 1,525 (of 13,920 total)