Title: erickruk's Replies | WordPress.org

---

# erickruk

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

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

 Search replies:

## Forum Replies Created

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

 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Add a Post Edit Category to the Navigation to Main Admin Menu](https://wordpress.org/support/topic/add-a-post-edit-category-to-the-navigation-to-main-admin-menu/)
 *  Thread Starter [erickruk](https://wordpress.org/support/users/erickruk/)
 * (@erickruk)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/add-a-post-edit-category-to-the-navigation-to-main-admin-menu/#post-7112394)
 * This is what I’ve tried. Best I get is the menu item but it doesn’t link. It 
   doesn’t show the icon, or show up after the posts link in the menu.
 *     ```
       function field_trips_menu() {
       add_menu_page('Field Trips', 'Field Trips', 'edit_posts', 'edit.php?category_name=field-trips', 'theme1438/includes/images/icon_portfolio.png','5');
       }
       add_action('admin_menu', 'field_trips_menu');
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [htaccess password protect a subfolder](https://wordpress.org/support/topic/htaccess-password-protect-a-subfolder/)
 *  Thread Starter [erickruk](https://wordpress.org/support/users/erickruk/)
 * (@erickruk)
 * [11 years ago](https://wordpress.org/support/topic/htaccess-password-protect-a-subfolder/#post-6089325)
 * I think I narrowed down the issue.
    In my wordpress directory, I have the htaccess
   with that new line of code, which allows me to get to the directory that I want
   to protect that is outside of the wordpress directory. However, the Root directory
   of the website has another htaccess file that is basically a duplicate of the
   wordpress file. But when I try to modify that one as well, my site crashes.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [htaccess password protect a subfolder](https://wordpress.org/support/topic/htaccess-password-protect-a-subfolder/)
 *  Thread Starter [erickruk](https://wordpress.org/support/users/erickruk/)
 * (@erickruk)
 * [11 years ago](https://wordpress.org/support/topic/htaccess-password-protect-a-subfolder/#post-6089319)
 * Hi St. Even,
    I added this to the top of my htaccess in the main wordpress root.
   <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI}
   ^/board-members/(.*)$ [OR] RewriteRule ^.*$ – [L] </IfModule>
 * I can now access my file outside of the root, but when I add another htaccess
   file to that directory, I get a 404 again.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Restrict Access to a sub driectory](https://wordpress.org/support/topic/restrict-access-to-a-sub-driectory/)
 *  Thread Starter [erickruk](https://wordpress.org/support/users/erickruk/)
 * (@erickruk)
 * [11 years ago](https://wordpress.org/support/topic/restrict-access-to-a-sub-driectory/#post-6031429)
 * This is what I currently have in my htaccess file
 * RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?wisconservation\.
   org/ [NC] RewriteCond %{REQUEST_URI} !hotlink\.(gif|png|jpg|doc|xls|pdf|html|
   htm|xlsx|docx|mp4|mov) [NC] RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress
   |wp-postpass_).*$ RewriteCond %{REQUEST_FILENAME} ^.*(mp3|m4a|jpeg|jpg|gif|png
   |bmp|pdf|doc|docx|ppt|pptx|)$ RewriteRule .*\.(gif|png|jpg|doc|xls|pdf|html|htm
   |xlsx|docx|mp4|mov)$ [http://www.wisconservation.org/boardportal](http://www.wisconservation.org/boardportal)[
   R=301,L]
 * It is the cookie line I am trying to figure out. I know the cookie being made
   is wp-postpass_ but there are wildcard characters attached to it.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Restrict Access to a sub driectory](https://wordpress.org/support/topic/restrict-access-to-a-sub-driectory/)
 *  Thread Starter [erickruk](https://wordpress.org/support/users/erickruk/)
 * (@erickruk)
 * [11 years ago](https://wordpress.org/support/topic/restrict-access-to-a-sub-driectory/#post-6031428)
 * So, it took a bit of work, but I got the htaccess to redirect when trying to 
   access the directory.
 * Does anyone know of to see of the cookie for protected pages has been set?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom Post Display Page : Sort by Menu order](https://wordpress.org/support/topic/custom-post-display-page-sort-by-menu-order/)
 *  Thread Starter [erickruk](https://wordpress.org/support/users/erickruk/)
 * (@erickruk)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/custom-post-display-page-sort-by-menu-order/#post-4690901)
 * <?php
 * /**
 *  * Template Name: How We Work 4 columns
 *  */
 * get_header(); ?>
 * <div id=”content” class=”grid_12″>
 *  <?php include_once (TEMPLATEPATH . ‘/title.php’);?>
 *  <?php global $more; $more = 0;?>
 *  <?php $values = get_post_custom_values(“category-include”); $cat=$values[0];?
   >
 *  <?php $catinclude = ‘howWeWork_category=’. $cat ;?>
    <?php $temp = $wp_query;
 *  $wp_query= null;
 *  $wp_query = new WP_Query(); ?>
 * **<?php $wp_query->query(“post_type=howWeWork&”. $catinclude .”&paged=”.$paged.’&
   showposts=12′); ?>**
 *  <?php if ( ! have_posts() ) : ?>
 *  <div id=”post-0″ class=”post error404 not-found”>
 *  <h1 class=”entry-title”><?php _e( ‘Not Found’, ‘theme1438’ ); ?></h1>
 *  <div class=”entry-content”>
 *  <p><?php _e( ‘Apologies, but no results were found for the requested archive.
   Perhaps searching will help find a related post.’, ‘theme1438’ ); ?></p>
 *  <?php get_search_form(); ?>
 *  </div><!– .entry-content –>
 *  </div><!– #post-0 –>
 * <?php endif; ?>
 * <div id=”gallery” class=”four_columns”>
 *  <ul class=”portfolio”>
 *  <?php
 *  $i=1;
 *  if ( have_posts() ) while ( have_posts() ) : the_post();
 *  if(($i%4) == 0){ $addclass = “nomargin”; }
 *  ?>
 *  <?php
 *  $custom = get_post_custom($post->ID);
 *  $lightbox = $custom[“lightbox-url”][0];
 *  ?>
 *  <li class=”<?php echo $addclass; ?>”>
 *  <?php if($lightbox!=””){ ?>
 * </span>
 *  <?php }else{ ?>
 * </span>
 *  <?php } ?>
 *  <div class=”folio-desc”>
 * </h4>
 *  <p class=”excerpt”><?php $excerpt = get_the_excerpt(); echo my_string_limit_words(
   $excerpt,16);?></p>
 * 
 *  </div>
 *  <?php $i++; $addclass = “”; endwhile; ?>
 *  <div class=”clear”></div>
 * </div>
 * <?php if(function_exists(‘wp_pagenavi’)) : ?>
 *  <?php wp_pagenavi(); ?>
 * <?php else : ?>
 *  <?php if ( $wp_query->max_num_pages > 1 ) : ?>
 *  <nav class=”oldernewer”>
 *  <div class=”older”>
 *  <?php next_posts_link(‘« Older Entries’) ?>
 *  </div><!–.older–>
 *  <div class=”newer”>
 *  <?php previous_posts_link(‘Newer Entries »’) ?>
 *  </div><!–.newer–>
 *  </nav><!–.oldernewer–>
 *  <?php endif; ?>
 * <?php endif; ?>
 * <!– Page navigation –>
 * <?php $wp_query = null; $wp_query = $temp;?>
 * </div><!– #content –>
 * <!– end #main –>
 * <?php get_footer(); ?>
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom Post Display Page : Sort by Menu order](https://wordpress.org/support/topic/custom-post-display-page-sort-by-menu-order/)
 *  Thread Starter [erickruk](https://wordpress.org/support/users/erickruk/)
 * (@erickruk)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/custom-post-display-page-sort-by-menu-order/#post-4690900)
 * Thank you for looking domokun, but that made my page show up blank. I even tried
   updated the variable $the_query to my $wp_query, but that didn’t work either.

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