Forum Replies Created

Viewing 15 replies - 1 through 15 (of 18 total)
  • Thread Starter timjamz

    (@timjamz)

    I managed to find it, so I’ll share it here in case anyone else is looking for it.

    The action hook is ‘edit_form_advanced‘ – for example:

    add_action('edit_form_advanced','my_custom_function');

    There is some standard HTML to apply to the output of the custom function in order to make it look seamless, but this approach will place additional information just below the “Discussion” div.

    Thanks for looking 🙂

    Don’t know what version you may be using, but I found this isn’t so difficult. In the latest version of this plugin, I simply edited view/gallery.php near the top — changed this line:

    <div class="ngg-galleryoverview" id="ngg-gallery-<?php echo $gallery->ID ?>">

    to this:

    <h3><?php echo $gallery->title; ?></h3><div class="ngg-galleryoverview" id="ngg-gallery-<?php echo $gallery->ID ?>">

    Notice the $gallery->title… looks like you don’t have to global the database, query the database, create a new variable or anything.

    Hope this helps!

    Hey, I had a problem like this as well, but was able to work out a solution using this tip! It is a great solution for custom query pages and navigation. Thanks for the tip!

    In my install (2.7.1), I had to place the $paged variable outside of the query_posts statement, like this:

    <?php if (have_posts()) : ?>
    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts($query . "category_name=somecat&paged=" . $paged); ?>
    <?php while (have_posts()) : the_post(); ?>
    Forum: Fixing WordPress
    In reply to: jQuery and WP 2.7
    Thread Starter timjamz

    (@timjamz)

    Oh, good grief! Somewhere I saw that my script had to be called before wp_head… Looking back at my post, I thought… that doesn’t make sense! The library needs to be called before my script.

    Placed my script after the wp_head section, and all is well.

    Thanks for looking anyway! 🙂

    Thanks, MichaelH. You WP mods are the bees knees! ^5

    John,

    Try manually disabling plugins you had active. In my case, I had to rename google-sitemap-generator. Renaming it with a underscore (_) or an x or something at the beginning should do the trick. After the upgrade, I immediately named it back, and all was well — plugin still active and everything.

    Hope this helps someone.

    SAnton: Rock on, dude! I’ve also been wrastlin’ with this – good catch!

    Thread Starter timjamz

    (@timjamz)

    Just a side note… even upgrading to 2.6.5, I get the same result outside the loop by making $post global. In ver.2.5.1 I am able to echo get_the_tags, get_the_excerpt, and even get_the_category. In version 2.6+, get_the_tags works just fine, but get_the_excerpt, and even get_the_category isn’t working.

    I’m stumped.

    Forum: Plugins
    In reply to: Get tags outside the loop

    To echo a list of tags from a particular post outside the Loop, you can set $post global, then do a foreach loop to echo the tags as normal.

    For example, I use this loop to display post tags as meta keywords in my header if the page is a single post page.

    <?php
       global $post;
       foreach(get_the_tags($post->ID) as $tag) {
          echo $tag->name . ', ';
       }
    ?>

    I’m not sure it’s possible to get an accurate account, since every piece of software is written for different metrics. For example, the Counterize plugin seems to count each and every hit, every time. WP-Stats seems to ignore bots (counter to Monika’s point). Google seems to count the least possible traffic, for whatever reason….

    Example: you might see 150 hits reported from Counterize, 90 hits reported from WP-Stats, and 40 hits reported from Google. Counterize sits on your blog and notes every time your site gets “hit” – including bots and your own traffic (unless you set to ignore it). WP-Stats sits on WP’s servers and relies on scripts to report traffic from your site to WP’s servers, and they choose what traffic to report as a “hit” while some traffic acts in “stealth” to avoid being counted. Google relies on Java script, so any user/browser with Java disabled won’t report anything to Google, combined with Google’s own criteria of what constitutes a “hit” and the stealth traffic.

    So, there’s no perfect counter. However, WP-Stats seems to be the least biased and most accurate I’ve found.

    HTH

    Offset would be a great option for wp_get_archives !

    Since I’ve also plunked around looking for a way to this, I thought I’d share my solution… I just used query_posts and a loop inside my sidebar to list posts with an offset, and styled them into a list:

    /* Shows up to 20 posts, excluding the first 6 */
    <?php if ( have_posts() ) : query_posts('showposts=20&offset=6'); while ( have_posts() ) : the_post(); ?>
    
    /* Style this to suit your own theme */
    <li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
    
    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>

    cikorka: Very good! I fiddled around with these other suggestions in WP2.5.1 with little success. This simple approach works great!

    A note: There’s no need to split up the PHP statement – the following works just as well:

    <?php if (have_posts()) : query_posts('cat=1,2,3'); while (have_posts()) : the_post(); ?>

    And to exclude instead of include, just use this format for the query_posts statement above:

    query_posts('cat=-1,-2,-3');

    As always, WordPress is the bees knees, and so is the support forum! Rock on, guys (and gals).

    @hfjn

    Nice catch! Fixed the problem with admin panel “add image” and “add media” lickety-split!!

    Again, the fix url is: http://trac.ww.wp.xz.cn/ticket/6443

    2.5 rocks, btw.

    Thanks for the tip! I was beating my head over this one too… forgot that with NTFS, cut/paste vice copy/paste retains permissions from original source. Thanks for the catch! Regards.

    moshu,

    Thanks from me, too! I inherited a theme which didn’t account for the padding-bottom in the comment.p

    Great catch, and HOORAH for WP’s round B funding! Woo hoo!

    Thanks,

    Tim (will-work-for-stock-options) Jamz.

Viewing 15 replies - 1 through 15 (of 18 total)