• Resolved Cham Agency

    (@ahmirof)


    Hi,

    I am using your plugin

    and also I’m using AffiliateWP, this plugin has a Affiliate portal, that is something like a dashboard. but i have a problem, when i click on the dashboard menu items, it wont go to that tab, and the current page will refresh.

    With a lot of tests, i find out if i disable your plugin, everything works fine. But i want to keep your plugin Enable.

    Also, i am not using your plugin features, on that specific portal page.

    Now can you tell me how can i fix that? Something like disable your plugin on that specific page …

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Maciej Bis

    (@mbis)

    Hi,

    Excluding the ID of the portal page would be the best option here. You can do so either programatically using below code snippet:

    function pm_exclude_affiliate_portal( $excluded_ids ) {
    if ( function_exists( 'affwp_get_pages' ) && class_exists( 'affiliate_wp' ) ) {
    $pages = affwp_get_pages();
    $affiliate_area_id = affiliate_wp()->settings->get( 'affiliates_page' );

    if ( is_numeric( $affiliate_area_id ) ) {
    $excluded_ids[] = $affiliate_area_id;
    }
    }

    return $excluded_ids;
    }
    add_filter( 'permalink_manager_excluded_post_ids', 'pm_exclude_affiliate_portal' );

    Alternatively, you can exclude it in the plugin settings:

    https://permalinkmanager.pro/docs/exclude-content-types/#3-exclude-posts-pages-terms-by-id

    Thread Starter Cham Agency

    (@ahmirof)

    I tried exclude using the plugin setting and seems it works, Thank you, If you think this is a good solution for me you can close this ticket.Thanks

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