How to add an external php page with wordpress?

Firstly your question shows no research or effort whatsoever. Also it isn’t elaborated efficiently. From what I gather you want a page with some code in wordpress. There are multiple ways to do it. Easiest way would be to create a new page template in your theme file. Go to your active theme folder and … Read more

How to use theme function in post/page?

Whenever using any WordPress function with get_xyz_etc() make sure you ECHO the function if you want to output the value there: <img class=”first-slide” src=”https://wordpress.stackexchange.com/questions/203434/<?php echo get_template_directory_uri() .”/images/landing-banner.png’; ?>” alt=”First slide”> It will now output the path!

Parsing Menu Items and Blog Posts

I’m sure what you’re asking can be done, but there’s a far simpler, significantly easier solution, just register each menu multiple times for each language, and show different menus for different languages. This way you don’t need to figure out how to filter out menu items depending on GET variables, and your pages become more … Read more

How can I check user capability when a page loads (via functions.php)?

If you want to redirect, a good event to use is template_redirect: add_action( ‘template_redirect’, ‘my_page_template_redirect’ ); function my_page_template_redirect() { // You can skip is_user_logged_in() if checking the user capability if( is_page( 1234 ) && ! current_user_can( ‘do_something_special’ ) ) { $redirect_to = ‘http://example.com/redirection-page’; // Default code status for redirection using wp_redirect is 302 // If … Read more