• Luca Foss

    (@luca-foss)


    If I want to create a function that reloads to the same “category” page I’m currently on, what would be the syntax for that?

    for example, my page is https://whatever.com/whatever/category/signup/

    I want to reload to this page..

    My function should say:

    function reloadPage(){
    
    require ( 'something' . 'signup');
    
    }
Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    What do you mean with reload? Include a template file?

    Thread Starter Luca Foss

    (@luca-foss)

    I’m creating a signup page with buddypress, and there is some function that I can’t find that redirects the page somewhere I don’t want it to go when someone hits the “submit” button.

    So I want to override this function, which buddypress allows you to do by creating action hooks.

    I want my action hook to be a function that refreshes the page that the user is currently on, which is the signup page, so the registration process can complete.

    Moderator keesiemeijer

    (@keesiemeijer)

    Have you tried their forums: https://buddypress.org/support/topics/

    Thread Starter Luca Foss

    (@luca-foss)

    yes I have, but it’s not really a buddypress issue as it is my not knowing the proper syntax to make this happen..

    my category-signup.php is located in my theme file…so I just want to reload the same page when the ‘submit’ action happens..

    so my function should be something like require( ABSPATH . 'signup.php')..or something to that effect..right?

    Moderator keesiemeijer

    (@keesiemeijer)

    You have to look what the action of the form is. Change it to <form action=”” … >. This will reload the same page after hitting submit. This will reload the page but you have to do all the validating of the submitted form yourself.

    Thread Starter Luca Foss

    (@luca-foss)

    For me to explain exactly how I’m doing this, I’d have to go into full detail about what I’ve discovered about how buddypress works vs. how I’m doing it (and I’m still new, so I don’t know many things)…

    so let’s just say that I want to create a work around and I want the function to redirect to the same category page, how would I get this done?

    ..and I appreciate all of your help…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Reloading "Current" URL In WordPress’ is closed to new replies.