Forum Replies Created

Viewing 4 replies - 61 through 64 (of 64 total)
  • Thread Starter Joshuwar

    (@joshuwar)

    Hi!

    Well, I’ve been digging around and I’ve found a few things that are halfway similar to what I’m trying to do here and there on the forums.

    But these aren’t trying to do the exact same thing I am; and as such I am totally at a loss. Almost. Actually, I’m kinda halfway there now, as I’ve added the post_is_in_descendant_category function and I’m using that to spit out info.

    Now its just a case of getting the thing to output the subcategory’s name, and my syntax/tag knowledge forbids me this pleasure. Here’s my code for finding out whether a post is in the parent category:

    <?php if ( post_is_in_descendant_category(7) ) {
    echo "Bongo is in 7!";
    }
    else {
    echo "Bongo is not in 7!";
    }
    ?>

    What I really need help with is replacing this Bongo stuff with the_category_which_is_the_descendant_of_the_parent_I_have_chosen

    But that doesn’t seem to work.

    Any assistance would again massively appreciated.

    Thread Starter Joshuwar

    (@joshuwar)

    Thats’s a good idea- thank you! Perhaps a fixed position div in one of the corners…. I’ll get on it…

    Glad you liked it!

    Thread Starter Joshuwar

    (@joshuwar)

    No thoughts at all? It’s pretty inaccessible, yeah? duff type?

    If you don’t mind poking around in the php, you can change this width- I had the same problem and found the culprit at line 375 of media.php:

    return '<div ' . $id . 'class="wp-caption ' . $align . '" style="width: ' . (10 + (int) $width) . 'px">'

    Just change ’10’ to whatever pixel width addition you require. None, in my case.

    This should really be configurable in the editor, though, I agree.

    Ciao!

Viewing 4 replies - 61 through 64 (of 64 total)