Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter tbaxter

    (@tbaxter)

    Nope. No matter what I do, I return everything or nothing at all.

    Thread Starter tbaxter

    (@tbaxter)

    Weird. I can’t get wp_list_cats to return anything, no matter what arguments (or none at all) I give.

    Thread Starter tbaxter

    (@tbaxter)

    I shoulda mentioned, I’m on 1.5.

    wp_list_cats returns nothing, no matter how I set it. I think it was deprecated for 1.5.
    list_cats(‘child_of=2’), like I said above, returns everything, ignoring the child_of argument.

    Forum: Fixing WordPress
    In reply to: Spacing in HTML

    It’s not ruining your HTML structure. The code doesn’t care if there’s tabs in there or not, only you do. Since wordpress is dynamically generating stuff, it puts it in as a straight text string…. but you’re never going to edit the dynamically generated code (although you may have to debug it)..

    Anyway, someone COULD (in theory at least) go into everywhere its generating the code and put the tabs in, but it’s really not worth it.

    Because your code is a weird mix of css and not… you’ve got an inline style on that iframe (first mistake), that looks like this:

    ‘style=”position: absolute; left: 10; top: 481; width:595; height:520″‘

    Now first off, you’ve given it no measurement unit… pixels? Ems? Percent?
    Second, Do you REALLY want it 481 pixels from the top… that’s going to be problematic on a 800-640 monitor (and roughly 30 percent of people are still on that resolution).
    Third, different browsers are weird about iframes and display them differently. You’ll have to account for that.

    But really, WHY would you want your wp in an iframe? For all the reasons above, and a lot more (like you’ll NEVER get spidered), this is a Very Bad Idea.

    Thread Starter tbaxter

    (@tbaxter)

    Pretty please?

    The validators aren’t looking for a label on every form, they want a label on every form element. Search boxes and dropdown lists absolutely count as form elements.

    Give the form element an id… usually I just make it the same thing as the name, and that’s fine… it’ll look something like:

    ‘<input type=”text” name=”blah” id=”blah” />’

    Then add the label, referencing the ID.

    ‘<label for=”blah”>This is blah</label>’

    That’s it.

    OK, I’m anonymous… It’s been a while since I did this, and I can’t remember exactly how or why I did stuff, but you all are welcome to it. The whole thing is based on nicer archives, with me hacking it to make it do what I wanted.

    <pre>
    ‘<div id=”content”>
    ‘ <?php
    ‘ $posts_per_page = ‘-1’;
    ‘ $defaultorderby = ‘category’;
    ‘ $defaultorder = ‘ASC’;
    ‘ define(‘NL’, “\n”);
    ‘ function archive_header($before=”, $after=”) {
    ‘ global $post, $orderby, $month, $previous, $siteurl, $blogfilename, $archiveheadstart, $archiveheadend, $category_name;
    ‘ $orderby = explode(‘ ‘, $orderby);
    ‘ $orderby = $orderby[0];
    ‘ if (‘category’ == $orderby) {
    ‘ $thiscategory = $category_name;
    ‘ if ($thiscategory != $previous) {
    ‘ $output .= ‘‘.get_catname($thiscategory).’‘;
    }
    ‘ $previous = $thiscategory;
    ‘ }
    ‘ if (!empty($output)) {
    ‘ $output = $before.$output.$after.NL;
    ‘ echo $output;
    ‘ }
    ‘ }
    ‘ function archive_date($format=’Y-m-d H:i:s’) {
    ‘ global $post;
    ‘ echo mysql2date($format, $post->post_date);
    ‘ }
    ‘ //Make sure categories get parsed out, they are deprecated in wp-blog-header.php
    ‘ global $author, $m;
    ‘ $orderby = ‘category’;
    ‘ if ($_POST[“order”] == ”) $order = “DESC”;
    ‘ else $order = $_POST[“order”];
    ‘ $year = ” . intval($_POST[“m”]);
    ‘ $m = $year;
    ‘ if (!empty($year)) $where .= ‘ AND YEAR(post_date)=’ . $year;
    ‘ if (!empty($whichauthor)) $where .= $whichauthor;
    ‘ $dogs = $wpdb->get_results(“SELECT * FROM $tablecategories WHERE 1=1 ORDER BY cat_name $order”);
    ‘ foreach ($dogs as $catt) {
    ‘ $categories = $wpdb->get_results(“SELECT * FROM $tablepost2cat WHERE category_id = $catt->cat_ID”);
    ‘ if ($categories) {
    ‘ echo ‘<div class=”storycontent”>’;
    ‘ foreach ($categories as $post2category) {
    ‘ $posts = $wpdb->get_results(“SELECT * FROM $tableposts WHERE $post2category->post_id = ID”.$where);
    ‘ global $category_name;
    ‘ $category_name = $post2category->category_id;
    ‘ if ($posts) {
    ‘ foreach ($posts as $post) {
    ‘ start_wp();
    ‘ archive_header(‘<h4>’, ‘</h4>

    ‘;
    ‘ echo ‘</div>’;
    ‘ }
    ‘ }
    ‘?>
    ‘ <!–end content –></div>'</pre>

    Allright, well I can’t get the <h4> header thing to output properly here, but I don’t think it varies much, if any, from the loop.

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