Title: milo2man's Replies | WordPress.org

---

# milo2man

  [  ](https://wordpress.org/support/users/milo2man/)

 *   [Profile](https://wordpress.org/support/users/milo2man/)
 *   [Topics Started](https://wordpress.org/support/users/milo2man/topics/)
 *   [Replies Created](https://wordpress.org/support/users/milo2man/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/milo2man/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/milo2man/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/milo2man/engagements/)
 *   [Favorites](https://wordpress.org/support/users/milo2man/favorites/)

 Search replies:

## Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Preview before publish does not work in 2.7](https://wordpress.org/support/topic/preview-before-publish-does-not-work-in-27/)
 *  [milo2man](https://wordpress.org/support/users/milo2man/)
 * (@milo2man)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/preview-before-publish-does-not-work-in-27/#post-929186)
 * I found a workaround that might help the rest of you.
 * First, I save a draft of a new post and mentally note its title slug. I then 
   manually insert the title into the preview URL path.
 * Let’s say I write a post called “New Post”. The Permalink on my site would be:
   
   [http://www.example.com/new-post/](https://wordpress.org/support/users/milo2man/replies/?output_format=md)
 * WP generates the following URL for the preview:
 * [http://www.example.com/?p=123&preview=true ](https://wordpress.org/support/users/milo2man/replies/?output_format=md)
 * This returns me to my homepage. However, if I insert the post title slug into
   the path, for example:
 * [http://www.example.com/new-post/?p=123&preview=true ](https://wordpress.org/support/users/milo2man/replies/?output_format=md)
 * Then I get the preview!
 * I assume that the problem has something to do with the way my .htaccess file 
   uses rewrite rules, but it’s beyond my ability to figure it out. Anyone have 
   any ideas?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Preview before publish does not work in 2.7](https://wordpress.org/support/topic/preview-before-publish-does-not-work-in-27/)
 *  [milo2man](https://wordpress.org/support/users/milo2man/)
 * (@milo2man)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/preview-before-publish-does-not-work-in-27/#post-929078)
 * I have the same problem running 2.6.1.
 * WordPress address is [http://www.example.com/wp/](http://www.example.com/wp/)
 * Blog URL set to [http://www.example.com/](http://www.example.com/)
 * Preview link is [http://www.example.com/?p=%5Bnn%5D&preview=true](http://www.example.com/?p=%5Bnn%5D&preview=true)
   takes me to the main page of the site (not the blog page).
 * Previews used to work fine before I moved the blog URL out of the wp directory.
 * I created a page in wp called “blog” and have my loop on that page. This I link
   to from the sites main page with [http://www.example.com/blog/](http://www.example.com/blog/)
 * The site’s main page is [http://www.example.com/index.php](http://www.example.com/index.php)
   which just shows the latest post exerpt and other static content.
 * Everything works fine except for the post preview. Anyone have any ideas.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Different Searchform for Each Category](https://wordpress.org/support/topic/different-searchform-for-each-category/)
 *  Thread Starter [milo2man](https://wordpress.org/support/users/milo2man/)
 * (@milo2man)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/different-searchform-for-each-category/#post-920373)
 * Let me try to explain. When the search query returns a result, the conditional
   tag `in_category(55)` works to send the search to the search results page for
   that category, search-art.php.
 * However, if the search query returns nothing (no results) then the conditional
   tag does not work (I guess because no results are actually in category 55) and
   the results page defaults to that for the blog.
 * How do I write the conditional tag so that it works even when there are 0 results?
 * I am breaking my head on this one, please help!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [regex help](https://wordpress.org/support/topic/regex-help/)
 *  Thread Starter [milo2man](https://wordpress.org/support/users/milo2man/)
 * (@milo2man)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/regex-help/#post-920298)
 * Thanks for the help. I tried these and finally managed to get it to work using
 * `RewriteRule blog/([A-Za-z0-9-]+)/$ /$1/ [R=301,L]`
 * The problem was the missing / after each expression.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [WordPress pages not visible behind corporate firewall](https://wordpress.org/support/topic/wordpress-pages-not-visible-behind-corporate-firewall/)
 *  Thread Starter [milo2man](https://wordpress.org/support/users/milo2man/)
 * (@milo2man)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/wordpress-pages-not-visible-behind-corporate-firewall/#post-905194)
 * Problem resolved. Had nothing to do with corporate firewall. The [ShareThis ](http://wordpress.org/extend/plugins/share-this/)
   plugin was causing the pages not to display in IE6.0.
 * After deactivating the plugin, everything works fine.
 * Anyone else have similar experience with ShareThis?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Rewrite Rule syntax help](https://wordpress.org/support/topic/rewrite-rule-syntax-help/)
 *  Thread Starter [milo2man](https://wordpress.org/support/users/milo2man/)
 * (@milo2man)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/rewrite-rule-syntax-help/#post-903897)
 * Ok, I’m getting a bit closer. I found this [here](http://www.sitepoint.com/article/apache-mod_rewrite-examples/2/).
 * > Redirecting a working URI to a new format
   > Here’s a curly one. Let’s say, for example, that we’ve got a set of working
   > URLs that look like this: /index.php?id=nnnn. However, we’d really like to 
   > change them to /nnnn and make sure search engines update their indexes to the
   > new URI format. First, we’d have to redirect the old URIs to the new ones so
   > that search engines update their indexes, but we’d still have to rewrite the
   > new URI back to the old one so that the index.php script would run. Have I 
   > got your head spinning?
   > The trick here is to place into the query string a marker code that will not
   > be seen by visitors. We redirect from the old link to the new format only if
   > the “marker” is not present in the query string. Then we rewrite the new format
   > link back to the old format, and add a marker to the query string, using the
   > QSA flag to ensure we’re not eliminating an existing query string. Here’s how
   > it’s done:
   >     ```
   >     RewriteCond %{QUERY_STRING} !marker
   >     RewriteCond %{QUERY_STRING} id=([-a-zA-Z0-9_+]+)
   >     RewriteRule ^/?index\.php$ %1? [R=301,L]
   >     RewriteRule ^/?([-a-zA-Z0-9_+]+)$ index.php?marker&id=$1 [L]
   >     ```
   > 
   > Here, the original URI, [http://www.example.com/index.php?id=nnnn](http://www.example.com/index.php?id=nnnn)
   > 
   > does not contain the marker, so it’s redirected by the first rule to [http://www.example.com/nnnn](http://www.example.com/nnnn)
   > with a HTTP 301 response. The second rule rewrites [http://www.example.com/nnnn](http://www.example.com/nnnn)
   > back to [http://www.example.com/index.php?marker&id=nnnn](http://www.example.com/index.php?marker&id=nnnn),
   > adding marker and id=nnnn in a new query string; then, the mod_rewrite process
   > is started over.
   > In the second iteration, the marker is matched so the first rule is ignored
   > and, _since there’s a dot character in index.php?marker&id=nnnn,_ the second
   > rule is also ignored … and we’re finished!
 * So, following this I changed my .htaccess to include:
 *     ```
       RewriteEngine On
       RewriteBase /blog/
   
       RewriteCond %{QUERY_STRING} !marker
       RewriteCond %{QUERY_STRING} cattag=([-a-zA-Z0-9_+]+)
       RewriteRule ^/?category/blog/$ %1/? [R=301,L]
       RewriteRule ^/?([-a-zA-Z0-9_+]+)$ /category/blog/?marker&cattag=$1 [L]
       ```
   
 * The first rule does succeed in redirecting
 * [http://www.example.com/blog/category/blog/?cattag=events](http://www.example.com/blog/category/blog/?cattag=events)
 * to
 * [http://www.example.com/blog/events/](http://www.example.com/blog/events/)
 * in the browser, but it returns a 404 error.
 * I can’t seem to make the second rule rewrite the pretty link back to the original
   format for WP to find the resource. There is no . in my URL like in the example,
   so it is probably not being ignored as it shoudl be???
 * I must be making a simple syntax error as I tried to adapt it from the poster’s
   original code. Can anyone help me get the second rewrite rule correct?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Rewrite Rule syntax help](https://wordpress.org/support/topic/rewrite-rule-syntax-help/)
 *  Thread Starter [milo2man](https://wordpress.org/support/users/milo2man/)
 * (@milo2man)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/rewrite-rule-syntax-help/#post-903893)
 * Thanks for this tip. I did exactly as you suggested, but the link still comes
   up as:
 * [http://www.example.com/blog/category/blog/?cattag=events](http://www.example.com/blog/category/blog/?cattag=events)
 * Any ideas?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [WordPress pages not visible behind corporate firewall](https://wordpress.org/support/topic/wordpress-pages-not-visible-behind-corporate-firewall/)
 *  Thread Starter [milo2man](https://wordpress.org/support/users/milo2man/)
 * (@milo2man)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/wordpress-pages-not-visible-behind-corporate-firewall/#post-904930)
 * Thanks for the tip. This makes sense. I have compared the site’s main /index.
   php (which the customer can see) and the /blog/index.php (which he cannot) and
   found some differences. I am not sure which of the following are even needed 
   by the blog???
 * `<head profile="http://gmpg.org/xfn/11">`
 * I don’t want my blog to be listed in some friends network. Can I safely delete
   this?
 * I also noticed that there are two meta name=”keywords” tags, one I created manually
   and one generated automatically by the Simple Tags Plugin. Is this a problem?
 * `<base href="http://www.example.com/" />`
    Exists on blog pages but not on the
   static pages outside the directory /blog
 * Then there’s this:
    ‘<meta name=”generator” content=”WordPress 2.6.1″ /> <!– 
   leave this for stats –>’
 * `<link rel="pingback" href="http://www.example.com/blog/xmlrpc.php" />`
 * `<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.
   example.com/blog/xmlrpc.php?rsd" />`
 * `<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://www.
   example.com/blog/wp-includes/wlwmanifest.xml" />`
 * Finally there’s the ShareThis widget which I do want to use.
 * `<script charset="utf-8" type="text/javascript" src="http://w.sharethis.com/widget/?
   tabs=web%2Cpost%2Cemail&amp;charset=utf-8&amp;style=default&amp;publisher=...`
 * What of all this can I safely delete???
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: TDO Tag Fixes] How to use wp_rewrite to include category in URL **fix](https://wordpress.org/support/topic/plugin-tdo-tag-fixes-how-to-use-wp_rewrite-to-include-category-in-url/)
 *  Thread Starter [milo2man](https://wordpress.org/support/users/milo2man/)
 * (@milo2man)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/plugin-tdo-tag-fixes-how-to-use-wp_rewrite-to-include-category-in-url/#post-894048)
 * Problem solved. There was a problem with the tdotf_the_tags when used on category
   pages. Thanks to [this post ](http://thedeadone.net/download/tdo-tag-fixes-wordpress-plugin/all-comments/#comment-103241)
   I was able to solve the problem.
 * In the tdotf.php file, I replaced the code beginning on line 399:
 *     ```
       function tdotf_the_tags( $before = '', $sep = '', $after = '' ) {
         global $tdotf_tag_get_var,$cat;
         if(is_category() && isset($tdotf_tag_get_var)) {
           $tags = get_the_tags();
       ```
   
 * with the following:
 *     ```
       function tdotf_the_tags( $before = '', $sep = '', $after = '' ) {
         global $tdotf_tag_get_var,$cat;
         if ( ! $cat ) {
           $category = get_the_category();
           $cat = $category[0]->cat_ID;
         }
         if(isset($cat) && isset($tdotf_tag_get_var)) {
           $tags = get_the_tags();
       ```
   
 * and this did the trick. One thing to note is that tdotf_the_tags was misspelled
   in the original file (as tdof_the_tags). I suppose either spelling would work,
   but I changed it to tdotf_the_tags for consistency.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Exclude posts from a category from appearing in Tag Cloud](https://wordpress.org/support/topic/exclude-posts-from-a-category-from-appearing-in-tag-cloud/)
 *  Thread Starter [milo2man](https://wordpress.org/support/users/milo2man/)
 * (@milo2man)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/exclude-posts-from-a-category-from-appearing-in-tag-cloud/#post-891471)
 * Thanks MichaelH
 * I tried the suggestions on the thread [http://wordpress.org/support/topic/144220](http://wordpress.org/support/topic/144220)
   and with the help of the [Sensitive Tag Cloud ](http://wordpress.org/extend/plugins/sensitive-tag-cloud/)
   plugin was able to get my home page to only show tags from posts in the blog 
   category.
 * However, the page with book reviews is showing the same tags (from the blog category)
   and not from the book review category.
 * Anyone else have this issue with the sensitive tag cloud plugin? Works on home
   page but not on other pages?

Viewing 10 replies - 1 through 10 (of 10 total)