php code for outputting a custom page in my account

Question

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 https://new.holistic-horse-training.com/forum-links):

add_action( ‘woocommerce_account_foren_endpoint’, ‘foren_content’ );

function foren_content() {
return $url = ‘https://new.holistic-horse-training.com/konto/forum-links/’;
}

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:
https://new.holistic-horse-training.com/wp-content/uploads/2020/12/content-in-my-account-window-scaled.jpg

Thanks in advance!

Pascale

0
PascaleK 3 weeks 0 Answers 3 views 0

Leave an answer