Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Could someone give me a simple explanation of the difference between using bloginfo(‘template_directory’) and TEMPLATEPATH for me? I’d sure appreciate it!

    Thanks!

    Shane

    Thanks, Nathan! I’m glad people found this handy, but I figured there was a more elegant way of handling it. Looks good.

    Always Learning!

    Shane

    Thanks, whooami. I’m not going to go crazy w/ the security stuff — moving wp-config file to a non-web-accessible directory might be worth the trouble, but I’d have to look into it.

    My concern was what you mentioned — that I’d screw up something & the contents of wp-config would be displayed for all the world to see. (Kind’a freaked me out the first time I made a mistake in php and – oops — there’s my code, right there in the browser!)

    Thanks for the info on install & upgrade. I’ll put upgrade back next time it’s needed, & delete install now.

    Definitely some good advise there, but I’m still wondering whether there’s any reason to leave files like /wp-config.php, /wp-admin/install.php, and /wp-admin/upgrade.php on the server once the initial install is complete?

    I can imagine that, even with write access disabled, if someone could manage to read the php code in wp-config, that would be bad.

    Thanks!

    Shane

    Okay, Mitthrustt — Using your original code, I think you’ll need to do something like this:

    First, I don’t think in_category() will take a list of values. You’ll have to use the php “or” operator, like this: “…in_category(1) || in_category(2) || in_category(3)…”

    You’ll need three separate template files; for instance: single.php, singlereview.php, and single-default.php

    Assuming you only want to modify what goes on between the header & footer, your single.php should look like this:

    <?php get_header(); ?>
    
    	<?php
            if ( have_posts() ) { the_post(); rewind_posts(); }
            if ( in_category(25) || in_category(26) || in_category (27) ) {
                include(TEMPLATEPATH . '/singlereview.php');
            }
            else {
                include(TEMPLATEPATH . '/single-default.php');
            }
        ?>
    
    <?php get_footer(); ?>

    …and your single-default & singlereview files should contain everything that originally went between the get_header and get_footer tags in your original single.php file, modified however you’d like.

    Or, you could try one of the two plugins that I linked to previously, now that I know it was my template that was screwey, & (probably) not the plug-ins.

    Happy coding!

    Shane

    oops — it was my freakin’ template that was causing the error. Should’ve known.

    Mithrustt, I’ll see if I can give you an answer in just a minute.

    okay, this plugin causes the exact same error. (I guess that’s somewhat reasonable.)

    I’m trying to do much the same thing, though with just one category. I tried a plugin called “Post Templates By Category“, but it’s really buggy in 2.5.1 — it made all the URLs to posts in the category I’d selected, point to the most recent post in that category. We-eird.

    I guess I could just use a giant “if…then…else” conditional, & have the code for one whole template inside the “then” part, and the code for the other template inside the “else” part, but that would make me feel really dirty.

    I’ll start digging. Somebody stop me if you know how to do this.

    Thanks!

    Shane

    Okay, I removed all the special characters from the user_activation_key using phpMyAdmin & that did the trick. Still no idea why my password changed to begin with.

    The only other thing I remembered doing that might be relevant, is that I added a “test” user (w/ reduced privileges) with the same email address as mine. I’m going to mess around with it for a bit & see if I can get the same error.

    I’m having the same problem, but the site that’s giving me trouble was built initially on 2.5.1 — not an upgrade. I’ve made changes to my theme, but haven’t made changes that I’d expect to cause a problem like this. I haven’t recently changed my password (and I’m certain I haven’t forgotten it).

    The only thing I can think of is that I added a second user (besides myself) to the system just a few days ago. I may not have logged-in since, so perhaps this caused the problem.

    Again — the link WP emails me to reset my password results in the error “Sorry, that key does not appear to be valid”.

    Is anyone else experiencing this? I’m going to try bmoses’ solution.

    & BTW,

    If you’d just changed your password properly in the first place you wouldn’t need to be so arrogant about having fixed it all by yourself.

    …that’s really uncalled for.

    Shane

Viewing 10 replies - 1 through 10 (of 10 total)