Skip to main content

Redirect the account page URL to a custom path

Premium Beginner

benecaster_account_page_url() returns the permalink of the /podcast-account/ page Benecaster creates on activation. Every plugin-generated link to a subscriber’s account — token emails, QR code screens — goes through it.

Use the matching benecaster_account_page_url filter when a podcaster has put [benecaster_account] on a page of their own instead, and wants those links to follow. Pass a non-zero $show_id to return per-show account pages on multi-show sites.

Code

<?php
// Point all account page links to a custom path, e.g. /my-podcast-portal/
add_filter(
    'benecaster_account_page_url',
    function ( string $url, int $show_id ): string {
        return home_url( '/my-podcast-portal/' );
    },
    10,
    2
);

View on GitHub →

Hooks Used

Need this built rather than just documented? See our services →