wej00
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Restricting categories on main blog pageI tried my own code and realized there is a huge flaw in the logic.
if(!in_category('5') && !in_category('6')) { Display post }Though it works to show the posts that I want, wordpress counts how many posts per page there are, and so it would not show the 2 categories, but still count them on the page. I don’t know why I thought that would work.
Does anyone have any idea how to make this work on the main wordpress loop?
EDIT:
I spoke too soon. Just found query_posts($query_string . ‘&cat=-5,-6’); works. Didn’t know I needed the $query_string variable.Forum: Fixing WordPress
In reply to: Assistance with query_post codeI am not sure if this would work, but try something like
<?php query_posts('posts_per_page=4&cat=64&post__not_in=121'); ?>I like doing it that way instead of an array, because it is simpler to me. Separate any variables with a ‘,’ like (121,123,155). I hope it works for you.
Forum: Fixing WordPress
In reply to: Permalinks are brokenYour right, that was the problem, but I never changed that so I didn’t think that was the problem… I wounder how it changed…
Forum: Fixing WordPress
In reply to: Permalinks are brokenI am not sure what you mean by “multisite with subdomain structure”. I just installed the blog in the /blog directory. It used to work, but changed for some reason… I do access blog info from pages other then what is in the /blog directory though.
Forum: Fixing WordPress
In reply to: Do I need to update WordPress?I assume it would be in the “Summary” section of that page. I don’t think 3.0.1 has a security update, but looks like such a small update, I did it anyway. Just follow the instructions and everything should be fine. If you have a testing server (You can get easyphp for your computer if you don’t) you can test out the update before you update the actual one.
Forum: Fixing WordPress
In reply to: Do I need to update WordPress?If there is a security update, it is highly recommended to update. If not, then I don’t worry about it until the plugins and whatnot update so they work with the current version (if they don’t). I don’t use many plugins though, and I made my own theme, so I usually update anyway.
Always remember to backup your Database, just in case something does screw up.
Forum: Fixing WordPress
In reply to: Add a video posting thing to admin menuFound what I was looking for. http://codex.wordpress.org/Function_Reference/wpdb_Class . Let me do a little more research.
Also, the question remains on how I am supposed to verify if someone is logged in and has access to the admin area.
Forum: Fixing WordPress
In reply to: Add a video posting thing to admin menuI could make that myself, but I need to know how WordPress does database calls. I have been searching through the codes and found the wpdb variable, but not sure if I can use it the same way it does on that page. I could test it out, but if someone could help me…
Forum: Fixing WordPress
In reply to: Add a video posting thing to admin menuI had that idea as well, but didn’t know of the Custom fields thing. The problem with this is that making a custom search to search through only videos and being able to organize them depending on the video category, as well as display A LOT of custom fields (parent, forum discussion link, length, picture, content, etc) would take just as long to program. I want to be able to keep them in their own table. This wouldn’t be a bad alternative though.
Having a SQL statement doing the organization is a lot more efficient and easy to program.
Forum: Themes and Templates
In reply to: Link to latest posts from certain categoriesActually, I just realized something. Since the sidebar is thin, I use “.substr($post[“post_title”],0,23).’…” to cut down the title to 23 characters so it doesn’t wrap down. How do i do so using the code on my last post? It doesn’t exactly let me do it the same way… though I am pretty stupid…
Forum: Themes and Templates
In reply to: Link to latest posts from certain categories<ul> <?php global $post; $myposts = get_posts('numberposts=5&category_name=Name'); foreach($myposts as $post) : setup_postdata($post); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endforeach; ?> </ul>Worked exactly as I needed. Thanks!
Forum: Themes and Templates
In reply to: Displaying only 10 characters with wp_get_recent_postsI suck with PHP but I am working on it…
Thank you very much!!!
Forum: Fixing WordPress
In reply to: An “” appearing before each double space.Learning experience. It took me a long time, but I then read something on setting the character sets and found out that you had to do that. It is funny though, the older browser firefox 2.x displayed it correctly, but the newer version of firefox and ie didn’t. I just added:
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />To the head of the page calling blog content and it fixed the problem.
Forum: Fixing WordPress
In reply to: An “” appearing before each double space.So I looked around the forum, and found other people having the problem awhile back. The solution I found was to comment out 2 lines in the wp-config.php
define(‘DB_CHARSET’, ‘utf8’);
define(‘DB_COLLATE’, ”);Comment them out like this:
//define(‘DB_CHARSET’, ‘utf8’);
//define(‘DB_COLLATE’, ”);BUT IT DIDN’T really work. It fixed the problem on the nonblog page, but then printed out diamonds with a question mark in them on the actual blog in the same place the  appeared. Why do the blog pages and the nonblog pages look different? What do I need to do to make both pages not have a mental problem????
Forum: Fixing WordPress
In reply to: An “” appearing before each double space.Like I said, It isn’t showing up on the actual blog, just the page that is calling it that is in a nonblog area.