o3world
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Warning: Undefined property: stdClass::$desc@alanfuller It is an original theme
- This reply was modified 3 years, 11 months ago by o3world.
Forum: Fixing WordPress
In reply to: Question about customizing the archives displayWas able to figure it out myself after some extended trial and error.
Forum: Fixing WordPress
In reply to: Trouble with search resultsI found a work around for my problem. Wrap my custom query within a conditional statement. If ( get_query_var( ‘s’ ) == NULL ) then run my query otherwise do the default one.
If anyone has a better solution I’m all ears.
<?php if ( get_query_var( 's' ) == NULL ) { $temp_query = $wp_query; $category = ( get_query_var( 'cat' ) ) ? get_query_var( 'cat' ) : -17; $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; $author = ( get_query_var( 'author' ) ) ? get_query_var( 'author' ) : NULL; $month = ( get_query_var( 'monthnum' ) ) ? get_query_var( 'monthnum' ) : NULL; $year = ( get_query_var( 'year' ) ) ? get_query_var( 'year' ) : NULL; // default category (all posts) returns as -0, if this is the case set it to -17 to ignore the 'news' category if ( $category == -0 ) $category = -17; $query_string = 'cat=' . $category . '&paged=' . $paged; if ( $year != NULL && $month != NULL ) $query_string .= '&year=' . $year . '&monthnum=' . $month . '$&order=DSC'; if ( $author != NULL ) $query_string .= '&author=' . $author; //echo $query_string; query_posts( $query_string ); } ?>Forum: Fixing WordPress
In reply to: Question about excluding a categoryNevermind. Solved it myself. Placed this before my Loop
<?php $temp_query = $wp_query; query_posts('showposts=10&cat=-17'); ?>Forum: Fixing WordPress
In reply to: Help with getting my permalinks workingLooking into that right now. I’m assuming it’s not turned on because:
A) I’m on a shared environment.
B) Simply turning the RewriteEngine On in .htaccess breaks the site.Forum: Fixing WordPress
In reply to: Help with getting my permalinks workingI moved the site to a staging server and I’m still having issues with my permalinks not working. Again in the “default” setting everything works fine. As soon as I change it to any kind of custom settings I get a 500 Internal Server Error on every page (home page, admin, blog, whatever).
.htaccess with default settings
# BEGIN WordPress# END WordPress
.htaccess with /%year%/%monthnum%/%postname%/ settings
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
Any tips? I’ve been searching through the forums here but have yet to come up with any solid leads as to how to fix this.
Forum: Fixing WordPress
In reply to: Help with getting my permalinks workingAhh, Thanks for the tip. I’m gonna try moving it to a DEV environment and see if that fixes it.