Direct iPhone visitors to different stylesheet?

There is a global $is_iphone variable, which you can check against in your code. global $is_iphone; if ( $is_iphone ) { // do something if $is_iphone is true } In the realm of your style.css however, I think @media queries may be easier. style.css is hard-coded as a required stylesheet, and there are no filters … Read more

How do I redirect users after submitting a topic for moderation?

Modify the file “form-topic.php” (located in “/wp-content/plugins/bbpress/templates/default/bbpress/form-topic.php”): 32 <form id=”new-post” name=”new-post” method=”post” action=”<?php the_permalink(); ?>”> Change it to: 32 <form id=”new-post” name=”new-post” method=”post” action=”<?php echo the_permalink() . “?redirect_to=/question-awaiting-moderation/”; ?>”> Upload this modified file to: “/wp-content/themes/YOUR_THEME/bbpress/form-topic.php” Do the same for the replies if you are moderating those (form-reply.php).

Redirect Attachment Page to Attachment

You can’t redirect after content has already been sent to the browser, hook an action before the template is loaded and do your redirect there. function wpa_attachment_redirect(){ if( is_attachment() ){ // your code and redirect here } } add_action( ‘template_redirect’, ‘wpa_attachment_redirect’ );

Log out and redirect to different URL

To understand why your redirect isn’t working, you should consider the mechanism it’s using: the Location HTTP header. The problem here is that HTTP headers cannot be sent once you begin outputting content onto the page. Your task is to determine where that content is being output. Is it a plugin? Try disabling all your … Read more