Forum Replies Created

Viewing 15 replies - 1 through 15 (of 38 total)
  • Plugin Author volfro

    (@volfro)

    Yes–you just have to create a custom template, as detailed in the other notes section. Once you’re ready to modify the loop, you can display whatever data from the post you’d like.

    Plugin Author volfro

    (@volfro)

    @gab1982 Sorry to hear you’re having trouble. A user actually submitted a patch that includes another translation, I just haven’t had time to get it merged with trunk.

    However, I’m not too familiar with WPML–could you describe your problem?

    Plugin Author volfro

    (@volfro)

    By default, the template uses the_excerpt() to display each post’s content. If you’d like images to show up, create a custom template (as shown in a previous thread), and use the_content() in place of the_exerpt().

    Plugin Author volfro

    (@volfro)

    Depends on your experience with theme development! If you create a custom template (as per the instructions here), you can basically do whatever you want with it.

    It’s exactly like creating a template file in your theme using a custom loop via WP_Query, except the query is already defined.

    The widget has access to the exact same data you’d have access to if you created a custom loop, you just have to use the $posts variable when instantiating it. It’ll look like this:

    <?php if ( $posts -> have_posts() ) :
        while ( $posts -> have_posts() ) :
            $posts -> the_post; ?>
    <h1><?php the_title(); ?></h1>
    <?php the_content(); ?>
    ...etc...
    <?php endwhile; endif; ?>

    You could definitely pull in an iCal feed, if you wanted to, but I’m not totally sure how you’d go about it. It could be done via a custom field, which you’d then have access to in the template file.

    A good place to start is to grab the included template file, copy it over to your theme’s directory, and customize it from there.

    Hope you find this little plugin helpful.

    FWIW, I had to manually disable Photon by commenting lines 50 and 51 out in slimjetpack/slimjetpack.php. Localhost couldn’t upload/download images from wp.com, or wp.com wasn’t seeing localhost, or my localhost URL was producing a bad URL in wp.com and causing it to fail (I didn’t investigate enough to determine where the problem was); either way, Photon was interfering, and all my images loaded via Photon (namely, anything in a tiled gallery) were 404ing.

    Commenting the Photon-loading lines out solved my problem in the latest Slim Jetpack (not 2.3.3).

    (As a sidenote, I re-enabled the Photon classes before setting my site up on a staging server, accessible from the Internet, and it works fine; it was just localhost that was causing issues. But why are the Photon scripts still loaded?)

    Thread Starter volfro

    (@volfro)

    @scribu Sure thing. Didn’t realize it was okay to submit a PR before changes were completed.

    Thanks!

    My bad: I’m using Roots as a starter theme, and its gallery function was interfering with Slim Jetpack. Disregard my last post.

    I’m actually not getting either feature in 2.3.3, either, using WAMP.

    Thread Starter volfro

    (@volfro)

    Thanks—I actually rolled my own with an option for infowindows. It just uses a separate JS file, as I didn’t want to put a bunch of conditionals in your JS. I also kept the fix for sortable table columns from a month or two ago.

    I’ve never done an SVN branch or anything, but I could branch your code if you’re interested in adding this feature. Pretty simple addition.

    Thread Starter volfro

    (@volfro)

    V.1.7

    Oh, strange, there’s a carriage return between every line. Doubles the length of the file. I’ve seen this happen to plug-ins and themes before.

    The real line numbers are lines 58:
    add_filter( 'parse_query', array( $this, 'sortAdminView' ) );
    and 546-561:

    /**
    		 * Sorts the posts by the title in the admin view posts screen
    		 * @author Ian Dunn <[email protected]>
    		 */
    		function sortAdminView( $query )
    		{
    			global $pagenow;
    
    			if( is_admin() && $pagenow == 'edit.php' && array_key_exists( 'post_type', $_GET ) && $_GET[ 'post_type' ] == self::POST_TYPE )
    			{
    				$query->query_vars['order'] = apply_filters( self::PREFIX . 'admin-sort-order', 'ASC' );
    				$query->query_vars['orderby'] = apply_filters( self::PREFIX . 'admin-sort-orderby', 'title' );
    
    				// @todo - should just have a filter on $query, or don't even need one at all, since they can filter $query directly?
    			}
    		}

    Thread Starter volfro

    (@volfro)

    You’re right. I just tested it on my local XAMPP and it works just fine—including rewrites.

    Man that annoys me! Ah well. If they host through me I make an extra couple of bucks, so. No complaints.

    Thanks again.

    Thread Starter volfro

    (@volfro)

    That is incredibly annoying. I blew hours on that crap today.

    Their hosting company sucks. I actually couldn’t even use the latest version of WP on it—for whatever reason, it kept springing database errors. Instead of updating their servers to be compatible with widely-used software, their support people insisted that either the client pay for a custom solution or I downgrade to their auto-installed version of WP, 2.2.3.

    So I downgraded, counting on it actually working.

    Looks like I’m going to have to see if they’d be willing to go with a new host. URL rewrites never worked properly anyway (thus the index.php). Ridiculous.

    Thanks a lot for your help, moshu. I was at a dead end — I’m no expert, but I know my way around WP, and couldn’t figure out what in the heck I was doing wrong. Guess I should’ve tested on my own XAMPP before I wasted your time.

    Thread Starter volfro

    (@volfro)

    Sorry, I wasn’t clear enough:

    I want this page template to function as an index for a certain category (in this case, BFA Posts) with pagination using query_posts.

    As it stands, WP creates the pages appropriately, but the pagination links themselves don’t actually lead anywhere. Instead of creating links that go to thesite.com/index.php/thepagename/page/x, the links just go to thesite.com/index.php/page/x, which of course results in a 404.

    Thanks for your reply!

    That’s exactly what I did on my site.

    Thread Starter volfro

    (@volfro)

    Yeah, I think it only works with the numerical ID.

    The $parent variable is actually used further down in the template, for calling the child pages with wp_list_pages. I didn’t necessarily need it for the two buttons, but it comes in handy anyway.

    If I were going to use a numerical ID, I would’ve just foregone the use of variables at all—but, as you can see, I’m a bit stubborn. One, I didn’t want to have to go in and edit the template file after it was uploaded (I’m using a local install of WP, and the page IDs would likely be different once I created them in their final environment), and two, learning how to do this means I can use it in other themes as well. I learned something about PHP in the process, which is an excellent thing.

    Thanks again for all your help!

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