Forum Replies Created

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter wej00

    (@wej00)

    I 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.

    I 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.

    Thread Starter wej00

    (@wej00)

    Your right, that was the problem, but I never changed that so I didn’t think that was the problem… I wounder how it changed…

    Thread Starter wej00

    (@wej00)

    I 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.

    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.

    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.

    Thread Starter wej00

    (@wej00)

    Found 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.

    Thread Starter wej00

    (@wej00)

    I 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…

    Thread Starter wej00

    (@wej00)

    I 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.

    Thread Starter wej00

    (@wej00)

    Actually, 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…

    Thread Starter wej00

    (@wej00)

    <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!

    Thread Starter wej00

    (@wej00)

    I suck with PHP but I am working on it…

    Thank you very much!!!

    Thread Starter wej00

    (@wej00)

    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.

    Thread Starter wej00

    (@wej00)

    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????

    Thread Starter wej00

    (@wej00)

    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.

Viewing 15 replies - 1 through 15 (of 17 total)