Skip to:
Content
Pages
Categories
Search
Top
Bottom

After comment back to last page of blog instead of last 1st page


  • hondendroom
    Participant

    @hondendroom

    Who can help….
    Our forum has been running for over a year now but still I can’t find a solution to this problem.
    What is the case? We are a site where you can post photos and observations of photo booths in specific topics.
    When you post a comment and click send, I suddenly jump back to the very last page…. How can I make sure I stay on the 1st page of the topic?
    Maybe a separate plugin?

    Thank you very much for the effort.
    Yvonne

    bbpres 2.2.6
    website hbnforum.nl

Viewing 3 replies - 1 through 3 (of 3 total)

  • Robin W
    Moderator

    @robin-w

    untested but try this

    add_filter ('bbp_new_reply_redirect_to', 'rew_redirect_to_topic', 10 , 3) ;
    
    function rew_redirect_to_topic ($reply_url, $redirect_to, $reply_id ) {
    	$topic_id = bbp_get_reply_topic_id ($reply_id) ;
    	$redirect_url = bbp_get_topic_permalink( $topic_id, $redirect_to );
    return $redirect_url ;
    }

    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


    hondendroom
    Participant

    @hondendroom

    Thanks Robin,
    I put it in the code snippet but unfortunately …. it didn’t work.
    I still go to the last page after a reply or a post.


    Robin W
    Moderator

    @robin-w

    just tested it on my site, and it seems to work.

    where did you put the code?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar