Austin Matzko
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Creating code which is not thereIn a plugin or in your theme’s
functions.phpfile.Forum: Fixing WordPress
In reply to: Creating code which is not thereBy default, WordPress formats post text with the
wpautop()function, which adds paragraph tags. There are a number of plugins that allow you to controlwpautopand the other formatting functions (just google it), or you can removewpautop()with the following line:remove_filter('the_content', 'wpautop');Forum: Fixing WordPress
In reply to: WordPress error when using “www” version of my siteCan you copy the contents of
index.phphere?Forum: Everything else WordPress
In reply to: toggling between permalinks settingsForum: Requests and Feedback
In reply to: Change /wp-admin pathwp-adminunlike other WordPress sub-directories, such aswp-contentand (sort of,wp-includes) is hard-coded everywhere, so you would need to usesedor some other such tool and recursively replace throughout WordPress core files every instance with the directory name you want.Forum: Plugins
In reply to: custom query based on custom fields – SQL relatedbecause I have around 1000+ entries it’s impossible to edit each one to add and define new custom field.
Actually, it would probably be simpler to insert the meta keys and values for your existing entries than to try to code around it for the indefinite future: your database performance will improve and you can use the WordPress posts’ query API.
Something like the following should insert default postmeta key of “Type” and value of NULL for all post ids that don’t already have one (this will work as long as your version of MySQL isn’t really old):
INSERT INTO wp_postmeta (post_id, meta_key, meta_value) SELECT ID AS post_id, 'Type' AS meta_key, NULL AS meta_value FROM wp_posts WHERE ID NOT IN (SELECT post_id FROM wp_postmeta WHERE meta_key = 'Type');(Of course, do this at your own risk; be sure to back up your database before trying, etc.)
Then you should be able to get a particular “Type” of post using the WordPress API:
query_posts(array('meta_key' => 'Type', 'meta_value' => 'Code'));Forum: Plugins
In reply to: LAST 10 Topics in the x categoryIf you need just one category, then do this:
$cat_id = 2; // "2" is the category id for the category you want query_posts(array('cat' => $cat_id, 'showposts' => 10)); if ( have_posts() ) : ?><h2><?php echo get_cat_name($cat_id); ?></h2> <ul> <?php while(have_posts()) : the_post(); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endwhile; ?> </ul> <?php endif;Forum: Installing WordPress
In reply to: Issue with New InstallTry re-uploading the files, but make sure that you get them from the official download link, which I linked to above. It really looks like your files were altered. Can you think of any reason that might have happened?
Forum: Plugins
In reply to: custom query based on custom fields – SQL relatedTo get the ones that don’t have a Type meta key set, you’ll have to un-join the postmeta table and exclude the IDs of the posts that do have that meta value.
There’s probably a better way overall of doing this; maybe you could describe what you’re trying to do?
Forum: Installing WordPress
In reply to: Issue with New InstallThe links in wp-admin still point to ../wordpress/wp-admin/, which is odd since they’re hard-coded into the admin files.
Forum: Fixing WordPress
In reply to: Permalink Problem I need Urgent Help!Contact your host and ask if mod_rewrite is installed.
Forum: Fixing WordPress
In reply to: Permalink Problem I need Urgent Help!Are you sure that you’re using a Microsoft IIS server? If you are, that fix may or may not work.
If you aren’t, then your
.htaccessfile should look something like this:<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>Forum: Installing WordPress
In reply to: Issue with New InstallActually, it’s still acting strange. Either the admin files have been modified or you have some sort of output buffer replacement going on.
I would try downloading the files again from here and uploading them over the current files.
Forum: Installing WordPress
In reply to: Issue with New InstallI went ahead and set it up so that the password was emailed to your email address as listed on your home page.
Forum: Fixing WordPress
In reply to: Permalink Problem I need Urgent Help!Then copy the text it tells you to copy, and paste it into
.htaccess