php code for outputting a custom page in my account


I am trying to figure this out for weeks now. I added some custom endpoints to my woocommerce my-account page. All but one are linked with a shortcode and work fine. One should link to a normal wordpress page, showing it within the my-account page. I don’t know how to program php and all it does for now is opening that page on a otherwise empty screen, not within the my-account page.

That’s the code I came up with, but the part within the {} must be wrong (as it opens to

add_action( ‘woocommerce_account_foren_endpoint’, ‘foren_content’ );

function foren_content() {
return $url = ‘’;

Could please somebody tell me the correct code for showing that page in the window of my account?
Here is a screenshot of the problem:

Thanks in advance!


PascaleK 2 years 2020-12-29T01:10:25-05:00 0 Answers 3 views 0

Leave an answer