Redirect to current user page upon link click

Thank you so much for the responses. Using both of the ideas received I started to play a little with the code, although I was not sure what to do with them. I came up with a solution that works very well for me, I created a new template in my theme called ‘redirect.php’. At … Read more

Kohana Frontend, WordPress Backend

You could add the Kohana part as a WordPress plugin that filters template_include and returns a local file path to your Kohana controller. Then you all the regular WordPress variables and functions are available in your additional code. If you want to use your own database layer you’d have to do the rewrite part probably … Read more

WordPress Rewrite Rule

As the question was modified, I modify my answer. This task is relatively easy, doable just with a single rewrite rule, which converts everything after /mypage/ string into a variable – I call it var. As this is added to query_vars via hook, is reachable via global $wp_query; echo $wp_query->var;. add_filter( ‘query_vars’, ‘binda_query_vars’ ); function … Read more

custom header text

For something like this, you can use WordPress’s built-in “Custom Fields” feature. Step 1 On your edit page, create a new Custom Field (if you don’t see the Custom Fields box on your edit screen, click on the grey”Screen Options” tab at the top-right of the page, and make sure the “Custom Fields” box is … Read more

save_post action inside a custom metabox class not working

I have modified your code as following and it is working for me. I have removed the constructor from your code and added the code in method and called that method using object. if (is_admin()){ add_action(‘load-post.php’, array(‘Mighty_Metabox’ , ‘Custom_Mighty_Metabox’)); } //the class class Mighty_Metabox{ //the vars public $id = false; public $title = false; public … Read more

How can I call a specific file (via php) by referencing the logged-in username?

Try to do this: <?php global $current_user;?> <?php if(is_user_logged_in()) :?> <?php get_currentuserinfo();?> <?php if(is_array( $current_user->roles ) && in_array( ‘map_user’, $current_user->roles ) ) : ?> <div id=”mapContent”> <?php require(“/mapping/”.$current_user->user_login.”.html/”); ?> </div> <?php endif; ?> <?php endif; ?> Source codex.wordpress.org