Forum Replies Created

Viewing 15 replies - 31 through 45 (of 472 total)
  • OK, this is very very ugly, but it works. I don’t know the secrets of WP so I can’t make the most of it. Maybe someone will clean this ??

    <?php if ( is_single() ) {
    if(get_query_var('p')) {
    $current = get_query_var('p');
    } else {
    $postname = get_query_var('name');
    $current = $wpdb->get_var("SELECT ID from $wpdb->posts WHERE post_name = '$postname'");
    }
    print "<ul>";
    $count = 0;
    $posts = get_posts('numberposts=6');
    foreach ($posts as $post) :
    setup_postdata($post);
    global $id;
    if ( $count < 5 and $id != $current ) { ?>
    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    <?php $count++;
    }
    endforeach;
    print "</ul>";
    } ?>

    [Never mind, stupid me ?? ]

    Why not enter that as your nickname? Or are you using the nickname for something already? What you have in the nickname field is not the same as what you use for login (even if the values were the same).

    First read what Denis has replied to your comment at Semiologic.com.

    You have two divs with the id “content” which might confuse the browser (it is not allowed after all). The same problem is on the main page even though the sidebar behaves well there.

    Forum: Plugins
    In reply to: Weighted Words 1.1

    @dgold: I’m glad to hear it ?? I tried changing the category number and it did change the results.
    I’m even tempted to hack a version of the plugin where the category ID can be given as a parametre ?? But maybe we’ll leave it to the plugin author. I often make my own versions of simple plugins (just to my own use, of course!) by adding them to the my-hacks.php file.

    Forum: Plugins
    In reply to: Weighted Words 1.1

    @chinaman: what if you tried it with a smaller $mincount. You can do that by just putting a number (less than 25 which is the default, for example 5?) inside the parentheses: <?php weighted_words(5); ?>
    I’m suspecting it might not work because you have so few posts in the test blog of yours and it requires 25 occurances (as the default) of a word before it shows up.

    Forum: Plugins
    In reply to: Weighted Words 1.1

    @dgold: It’s a bit more complicated than that because the posts table in the database doesn’t have the category id. However, this should work (I did test it):

    $postcontents = $wpdb->get_results("SELECT post_content FROM $wpdb->posts, $wpdb->post2cat WHERE $wpdb->post2cat.post_id = $wpdb->posts.ID AND post_status = 'publish' AND post_date < '$now' AND category_id=2");

    That’s put together with my simplish knowledge of SQL ??

    Forum: Plugins
    In reply to: Weighted Words 1.1

    @chinaman: if you’re happy with the default values, you can just add <?php weighted_words(); ?> in your sidebar.php.

    If you want to, you can change the values: for example, if I wanted these values $mincount = 20, $minlength = 5 , $minfont = 80%, $maxfont = 300%, I would add <?php weighted_words(20,5,80,300); ?> to my sidebar.php.

    The words starting with $ are the function’s parametres and they have to be in the same order as the function writer has defined. The definition in this case is on the plugin page under “Usage”.

    The Codex has info about passing parametres to WP template tags and it applies to plugin functions as well.

    As to your question on step 4. The plugin adds the <p class="weightedwordlist"> around its output (at least it should), you don’t have to add it yourself. With the help of the class you can style the list in your style.css.

    Go to Options > Miscellaneous. There’s a checkbox “Allow File Uploads”, check it (if there isn’t a mark there) and an Upload link should appear in the top menu (where Write, Manage, etc. are).

    If that is what you are currently doing, using the Upload that is (I’m not sure from your explanation…), that is as simple as it gets, I think ?? I’m sure someone can recommend a plugin.

    See the Codex for some image related plugins

    @ppoivre: On the main support page (where you see latest posts etc.) scroll to the very bottom, click on the correct forum, scroll to the very bottom of the page again, and there you’ll find a form for posting a new thread.

    Pages don’t use categories yet, so there is nothing with which to control it. You can for example remove the_category() from the page template (if there is one in the theme) or add <?php if (!is_page()) { ?> ... <?php } ?> around the template tag.

    @stchatterbox, for a change ??
    I tried the code snippet you showed and it doesn’t generate hiearchical listing. If you still have the same problem, double check the parametres, patiently, when Codex (or its cached version) starts working…

    On that site you have drop down lists for categories and months that I can’t see in that source code. Are you sure you are editing the correct file (hey, I’m just out of ideas ?? )?

    I’m just wondering the whole thing because your source code states pretty clearly: <meta name="generator" content="WordPress 1.5" /> <!-- leave this for stats -->
    That would suggest you haven’t upgraded, at least not successfully.

    Am I looking at the correct site? xD (https://experi10.madpage.com/blog/wordpress/)
    Could you copy-paste what you have for wp_list_cats? Did you check that there really is a parent/sub category relationship between the two categories you currently have?

Viewing 15 replies - 31 through 45 (of 472 total)