immow
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Warning: Cannot modify header information – headers already sent byI like to add that a friend of mine claimed using opera it takes a long time to load the pages (I use a drop down menu theme) where one pages is restricted. Second strange thing is the plugin is gone from plugins in wordpress but I can still use the plugin-restriction admin pannel
Forum: Fixing WordPress
In reply to: Warning: Cannot modify header information – headers already sent byAfter reading like 50 posts I manged to change the code so that it works.
Source can be found here of my working page restriction code: http://immow.nl/page_restriction.txt
If this page is dead then you can look at the comments at author site for the solution. I combined the following suggestions in comments from http://17thdegree.com/archives/2005/07/01/wordpress-plugin-page-restriction/:
####Part 1####
Line 81:
WHERE $wpdb->posts.post_type = ‘page’Line 85:
$posts = $wpdb->get_results(“SELECT $wpdb->posts.* FROM $wpdb->posts WHERE post_type = ‘page'”);Line 123:
$pages = $wpdb->get_results(“SELECT * FROM $wpdb->posts WHERE post_type = ‘page’ ORDER BY menu_order”);Then my pages appear under Options > Page restriction and I’m able to select the pages that require a logged-in user. When that page is selected in the menu, user is immediately taken to the login screen.
####part 2####
You find this code at the bottomadd_action(‘wp_head’, ‘check_the_user’);
to
add_action(‘template_redirect’, ‘check_the_user’);I like to thank whooami for pointing out the power of reading.
Forum: Fixing WordPress
In reply to: Warning: Cannot modify header information – headers already sent byWithout those changes the plugin would not show my pages that I could restrict.
Forum: Fixing WordPress
In reply to: Title / HeaderI resolved this: http://codex.ww.wp.xz.cn/Designing_Headers