Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter generalsalt

    (@generalsalt)

    Ok, got it.

    I can use this..

    $showposts = get_query_var(‘showposts’);

    Thread Starter generalsalt

    (@generalsalt)

    thank you!!

    Thread Starter generalsalt

    (@generalsalt)

    If there is another pagination plugin that works with custom loops right outta the box…plzz plzz link me!!

    Thread Starter generalsalt

    (@generalsalt)

    Ok, just figured it out. In category-template.php I added:

    function wp_dropdown_categories( $args = '' ) {
    	$defaults = array(
    		'show_option_all' => '', 'show_option_none' => '',
    		'orderby' => 'ID', 'order' => 'ASC',
    		'show_last_update' => 0, 'show_count' => 0,
    		'hide_empty' => 1, 'child_of' => 0,
    		'exclude' => '', 'echo' => 1,
    		'selected' => 0, 'hierarchical' => 0,
    		'name' => 'cat', 'class' => 'postform',
    		'depth' => 0, 'tab_index' => 0,
    		'top_option' => ''
    	);

    and added this to the output:

    $output .= "<option>$top_option</option>";

    Now top_option is available as a parameter.

    Forum: Fixing WordPress
    In reply to: Inventory
    Thread Starter generalsalt

    (@generalsalt)

    Oops double post

    Thread Starter generalsalt

    (@generalsalt)

    The get_children documentation is a little lacking…I was curious if the “post_type” argument or the “post_mime_type” argument can target text the way it can attachments?

    Of course this is wrong..but this is what I mean..

    $text =& get_children( array(
    ‘Content-Type’=>’text/plain’,
    ‘post_parent’ => get_the_ID(),
    ));

    Thread Starter generalsalt

    (@generalsalt)

    i tried the code with a 1 instead, within the Loop. It pulls the first picture of the Media Library in. That pulled picture (from the Media Lib) is not even in my post! When I use a -1 it pulls all the pictures from the gallery.

    What I was trying to explain is that it is not pulling from my post, it is pulling from the Media Library.

    I’ve tried to put the above code in the Loop, outside the Loop, in it’s own Functions file.

    Thanks though…still am struggling with this.

    When I use the code above, it just pulls EVERYTHING from the media gallery..even when those images are not part of a post.

    Thread Starter generalsalt

    (@generalsalt)

    for example….

    In the Codex, it says put this (code below) in the Loop..do they mean in the Loop on the index.php or single.php? Because in the index.php if I have 7 posts, the code below only spits out the jpegs of the first post only. Arrrgghhh!!

    <?php
    
    $args = array(
    	'post_type' => 'attachment',
    	'numberposts' => -1,
    	'post_status' => null,
    	'post_parent' => $post->ID
    	);
    $attachments = get_posts($args);
    if ($attachments) {
    	foreach ($attachments as $attachment) {
    		echo apply_filters('the_title', $attachment->post_title);
    		the_attachment_link($attachment->ID, false);
    	}
    }
    
    ?>

    Thread Starter generalsalt

    (@generalsalt)

    Okay so I stuck the above code and made it a function and put it in function.php

    function getPostImages(){
    
    	$theID = $post->ID;
    	//echo $theID;
    
    	$attachments =& get_children( array(
    		'post_parent' => $theID,
    		'post_type' => 'attachment',
    		'post_mime_type' =>'image'
    	));
    
    	if ($attachments === FALSE) {
    	   echo 'no attachments';
    	} else {
    	    foreach($attachments as $attach) {
    			$attachmenturl=wp_get_attachment_url($attach->ID);
    			echo $attachmenturl . '<br /><br /><br />';
    			//$attachmentimage=wp_get_attachment_image( $attach->ID, 'thumbnail' );
    	    }
    	}
    }

    I am calling it from within the Loop. It spits out the URL of every pic in the media gallery–for EVERY post.

    Using the ID for each post seems like it should only spit out the photos for that particular post…OK back to the drawing board.

    Thread Starter generalsalt

    (@generalsalt)

    I’ve been looking into the WP Ecommerce and it looks like that one doesn’t support Direct Payment either.

    Thread Starter generalsalt

    (@generalsalt)

    The more research I do I don’t think there are ANY WordPress plugins that support Direct Payment at all.

    That sucks, I really wanted to use WordPress. I don’t think I knowledgeable enough about WordPress plugins to write my own at this point…

    Not a WordPress question but, are there any standalone carts that support a direct payment style checkout?

    Thread Starter generalsalt

    (@generalsalt)

    Yep, I will.

    Plz do the same..

    Currently checking out the YAK plugin for wordpress..I think I going to give up the WP-Ecommerce plugin…that thing is way too buggy.

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