Forum Replies Created

Viewing 15 replies - 391 through 405 (of 449 total)
  • Thread Starter Alkorr

    (@alkorr)

    Indeed. That works. Only if the latest generation category is checked. Otherwise, it gives something like:
    Books, Reviews, Books, Fantasy

    That’s why I wanted to know what were WordPress standards concerning categories meant to be checked when writing posts. Because most of the people I know that are using WordPress, have multiple categories assigned to a post.

    Thank you very much for your replies, now I’m going to work on a big issue: how to manage my duplicate category names that can’t duplicate anymore (I know, it’s a dead end, but you can’t imagine how it is to lose an entire blog content you’ve been posting for years when you realize the latest versions of WP don’t accept duplicate category names/slugs anymore).

    Thank you for your patience! πŸ™‚

    Thread Starter Alkorr

    (@alkorr)

    Thanks for your reply MichaelH, now I know πŸ™‚

    But this leads to another question: if I check multiple hierarchical categories i.e:
    Books + Reviews + Fantasy

    Then when I use <?php the_category(‘, ‘) ?>, I get this:
    Reviews, Books, Fantasy

    Which doesn’t ‘mean’ anything because it’s not hierarchical anymore. It should be:
    Books then Reviews then Fantasy, as my categories have been created (Fantasy chilf of Reviews and Reviews child of Books) but it doesn’t work like this and I don’t know why.

    This is an important question IMO because if I only check the latest generation category then <?php the_category(‘, ‘) ?> only give me: Fantasy. Which is cool but if want to show the first parent category name: Books and then Fantasy, how do I do that? I checked and didn’t find anything, or maybe I missed it…

    WordPress is amazing but sometimes it’s like ‘simple’ functions are missing, mostly when it comes to category management. Again, maybe I’m missing something, and if I do I’d be happy to learn πŸ™‚

    I finally used the Codex function:

    <?php if ( in_category( 'fruit' ) || post_is_in_descendant_category( 11 ) ) {
    	// These are all fruits…
    }
    ?>

    It doesn’t do exactly what I want but I will stick with it for now!

    Thread Starter Alkorr

    (@alkorr)

    That works perfectly! Thank you so much for your precious help vtxyzzy!! πŸ™‚

    Thread Starter Alkorr

    (@alkorr)

    Still no idea?

    Happy New Year! πŸ˜‰

    Same problem here, Testing if a post is in a descendant category doesn’t work…

    Any help? Seems very simple but apparently there is no function in WordPress for that. Weird.

    Thanks for your help!

    Thread Starter Alkorr

    (@alkorr)

    I corrected the typo but it still doesn’t work πŸ™

    My full code is:

    <?php
    global $wpdb;
    $sql =
    "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID,
        comment_author, comment_date, comment_approved, comment_type,comment_author_url,
        SUBSTRING(comment_content,1,100) AS com_excerpt
    FROM $wpdb->comments
       LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID)
       INNER JOIN $wpdb->term_relationships as r1 ON ($wpdb->posts.ID = r1.object_id)
       INNER JOIN $wpdb->term_taxonomy as t1 ON (r1.term_taxonomy_id = t1.term_taxonomy_id)
    WHERE comment_approved = '1'
       AND comment_type = ''
       AND post_password = ''
       AND t1.taxonomy = 'category'
       AND t1.term_id IN ('10','20')
    ORDER BY comment_date DESC LIMIT 4";
    
    $comments = $wpdb->get_results($sql);
    $output = $pre_HTML;
    $output .= "\n";
    foreach ($comments as $comment) {
    $output .= "Β« ID)."#comments" . "\" title=\"Comment on ".$comment->post_title . "\">" . strip_tags($comment->com_excerpt)."... Β» Comment on ". strip_tags($comment->comment_author) ." , ". strip_tags($comment->comment_date) ."";
    }
    $output .= "\n";
    $output .= $post_HTML;
    echo $output;
    ?>

    I don’t know why it doesn’t work…

    Thread Starter Alkorr

    (@alkorr)

    Can someone please tell me if the code is right or totally going in the opposite way of what I’m trying to achieve? Because I’m quite lost there…

    Thanks for your help!

    Thread Starter Alkorr

    (@alkorr)

    Hi vtxyzzy! I replaced my $sql query by yours and replaced the ‘??catidn’ with my own category id but unfortunately, it doesn’t show anything. The page is blank, nothing.

    Any idea why?

    Thread Starter Alkorr

    (@alkorr)

    Hi vtxyzzy! Here is my code:

    <?php
    global $wpdb;
    $sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date, comment_approved, comment_type,comment_author_url, SUBSTRING(comment_content,1,100) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' ORDER BY comment_date DESC LIMIT 4";
    
    $comments = $wpdb->get_results($sql);
    $output = $pre_HTML;
    $output .= "\n";
    foreach ($comments as $comment) {
    $output .= "Β« ID)."#comments" . "\" title=\"Comment on ".$comment->post_title . "\">" . strip_tags($comment->com_excerpt)."... Β» Comment on ". strip_tags($comment->comment_author) ." , ". strip_tags($comment->comment_date) ."";
    }
    $output .= "\n";
    $output .= $post_HTML;
    echo $output;
    ?>

    Thanks for your help πŸ™‚

    Thread Starter Alkorr

    (@alkorr)

    Hi, I tried to modify my code but it’s getting worse… πŸ™

    Any help is welcome, thank you! πŸ™‚

    Thread Starter Alkorr

    (@alkorr)

    Well, ticket closed! It took 16 hours to close it without any fix.
    http://core.trac.wordpress.org/ticket/11510
    Great… See t31os_, that’s despairing…

    WordPress development team changed the way multiple categories/slugs are handled which makes blogs like mine not compatible anymore with the latest version of WordPress (I can’t upgrade above WP 2.3). They don’t provide any solution, saying: ‘Closing as the proposed feature – duplicate category slugs – is not going to hapen’

    It has nothing to do with the enormous, excellent work the WordPress developers do, it has to do with a BIG change in WordPress category/slug management that makes hundreds of blogs totally unupgradable, stucked with really old versions of WordPress…

    I’ve been said once: ‘You used to manage your categories this way because you were using a bug in WordPress’. Maybe, so it wasn’t my fault then and now WordPress changes everything and I can’t upgrade anymore and the answer is: ‘Closing as the proposed feature – duplicate category slugs – is not going to hapen’. Thanks for your support!

    Seriously, that’s not fair to abandon WordPress users in the side this way, I feel neglicted and ignored for almost 2 years now. I understand since all the changes have been made WordPress developers can’t go backward, but at least, provide a solution for the already existing problems, that’s the least WordPress should do!

    I even suggested a solution using taxonomies but the answer was: ‘I think both of those can be build into a plugin’. Ok then where is the plugin? WordPress developers relay on Plugin developers to solve a problem they created. I’m sorry if we (blog owners) used a bug but we weren’t warned and then now our blogs can’t be upgraded anymore, as well as our databases. We’re stucked (if not totally f_cked)…

    So maybe someone (I’m not asking the developers, they close the tickets regarding this problem within hours) can help us, please let me know. I’m really alone against WordPress right now, even if I’m far from being the only one suffering the lack of support from WordPress on this subject.

    Again, it doesn’t take anything from all the good I think of the work done by WordPress Developers but I think it’s unfair to let people on the side without daring helping them since ‘thinks have changed’ and we suffer from that abrupt decision.

    I really hope I will be read by WordPress Team and not just ‘closed’ away like a junk ticket because that’s it, things have changed, you’re stucked, end of topic. That’s rude and I know many blogs from organizations in the same situation as mine that will have to start over from scratch because ‘things have changed’. That’s pretty unfair to lose everything you’ve written and done of your blog for years, only because ‘things have change’ without any alternative solution.

    I really hope my message will be taken into consideration. My complain is fully justified, I’ve been waiting for 2 long years for it. Thanks!

    Thread Starter Alkorr

    (@alkorr)

    I will, certainly, but I still don’t get why they didn’t include the fix in WP 2.9… It’s not recommanded to hack WordPress core files and I thought when they correct a bug, the modifyed file was included into the new version.

    So I’m afraid re-re-opening new tickets over and over on the same topic will not help much…

    Thread Starter Alkorr

    (@alkorr)

    Hi cais, I can’t reverse the current order for one simple reason: I have many subcategories other than Fantasy, like RPG for example. Then reversing or not the order will give the same: duplicate categories/slugs:

    Fantasy
    – Reviews
    — Books
    — Games

    RPG
    – Reviews
    — Books
    — Games

    Plus, the main categories are supposed to be Books, Videogames, Movies and so on. For each main category, it’s a different template (book-like one for Books, videogames-style for Videogames, …).

    I tried everything, thought of everything. I’m stucked with an old WP version (I can’t upgrade beyond 2.5…) because of it. I’m stucked. But thanks for your help πŸ˜‰

    Thread Starter Alkorr

    (@alkorr)

    Same answer here. Read my comment on the other post:

    Categories ID/Slug – Huge issues!
    http://wordpress.org/support/topic/229543?replies=11

    No change with WP 2.9.

Viewing 15 replies - 391 through 405 (of 449 total)