erickruk
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Add a Post Edit Category to the Navigation to Main Admin MenuThis 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
In reply to: htaccess password protect a subfolderI 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
In reply to: htaccess password protect a subfolderHi 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
In reply to: Restrict Access to a sub driectoryThis 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 [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
In reply to: Restrict Access to a sub driectorySo, 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
In reply to: Custom Post Display Page : Sort by Menu order<?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 class=”image-border”>” rel=”prettyPhoto[gallery]” title=”<?php the_title();?>”><?php the_post_thumbnail( ‘howWeWork-post-thumbnail-small’ ); ?><span class=”zoom-icon”></span></span>
<?php }else{ ?>
<span class=”image-border”>” title=”<?php _e(‘Permanent Link to’, ‘theme1438’);?> <?php the_title_attribute(); ?>” ><?php the_post_thumbnail( ‘howWeWork-post-thumbnail-small’ ); ?></span>
<?php } ?>
<div class=”folio-desc”>
<h4>“><?php $title = the_title(”,”,FALSE); echo substr($title, 0, 40); ?></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
In reply to: Custom Post Display Page : Sort by Menu orderThank 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.