Advertisement:

Author Topic: How can I Redirect after item is published?  (Read 3797 times)

epboeira

  • Newbie
  • *
  • Posts: 11
Re: How can I Redirect after item is published?
« Reply #15 on: August 09, 2017, 06:37:31 am »
And if I wanted to redirect to another add listing?

What goes in the place of 'post-sussesfully' ?

Code: [Select]
function redirect_to_landing($item) {
        osc_get_static_page('post-sussesfully');
        header('Location: ' . osc_static_page_url()); exit;
    }
    osc_add_hook('posted_item', 'redirect_to_landing');
    // add this code in the functions.php of your theme


BenKia

  • Newbie
  • *
  • Posts: 15
Re: How can I Redirect after item is published?
« Reply #16 on: August 14, 2019, 06:37:14 am »
Hello zombie,

YOUR POST:

On paypal plugin index.php replace this
paypal_redirect_to(osc_search_category_url());

with this
paypal_redirect_to(osc_item_url());

MY QUESTION:

How to redirect to a static page instead of redirect to the posted item page?


WEBmods

  • Hero Member
  • *****
  • Posts: 983
Re: How can I Redirect after item is published?
« Reply #17 on: August 14, 2019, 12:17:49 pm »
Hello zombie,

YOUR POST:

On paypal plugin index.php replace this
paypal_redirect_to(osc_search_category_url());

with this
paypal_redirect_to(osc_item_url());

MY QUESTION:

How to redirect to a static page instead of redirect to the posted item page?

I don't know if there's a helper, but you can get the static page URL like this:

Code: [Select]
osc_base_url().'?page=page&id=ID';

Be sure to replace ID with the ID of your static page.

Regards.