wpeck
Forum Replies Created
-
Unfreakin’believeable. I would not have found this in a year of trying. Thank you so much for taking the time to give us places to look. I had two spaces after the close php.
Forum: Plugins
In reply to: [BP Group Documents] Can't Find Document tabI’m having exactly the same problem. BP Group Documents 1.5. New install of BP 1.9.2. with WP 3.8.1. Hoping someone has figured it out.
Forum: Fixing WordPress
In reply to: WordPress makes me reset my password EVERY time I loginI had this same problem. My site url was set to www, but my WP address did not have the www. Changing the WP address to inlclude the www seems to have fixed the problem.
Holy — I messed that up. In case this can actually help someone else, here is the code that gave me control.
<?php query_posts(array('post_type'=>'smile', 'posts_per_page'=>'10', 'paged' => $paged)); ?>
and the actual pagination after the loop closes.
<?php posts_nav_link('','','? Previous Entries') ?> <?php posts_nav_link('','Next Entries ?','') ?>
Hope that comes out a bit better. I don’t have a full understanding of exactly why this is working yet. I more or less guessed at a possible solution and was quite surprised when it worked. Do NOT take this as a fully-tested solution from an expert.
Messed up the code for this post. Corrected one follows.
Thank you very much for getting back to me. I am never sure if I am doing something wrong, or if I am expecting something that is not possible.
I’ll watch for it — maybe you can even drop a note to this thread when it is ready. It’s exactly what I am looking for, but I almost always have a custom post type for my most important content. Thanks again. Great plugin.
One of these days, I will cut and paste myself into insanity. For as hard as I have stared at this code, I was not seeing that. It’s working. Thank you so very, very much. Now I can move to my comfy place — CSS.
I can’t expose the url as I am working on a client file, so I will have to post it here. This is the template file for the page I am trying to display the matrix on.
Note: I have the loop endwhile commented out — I always seem to have to do that. Related. I haven’t had any trouble with it otherwise. This is actually the third site I’ve done that for.
The custom post type is smile.
<?php /** Template Name: Smile */ get_header(); ?> <div id="container"> <div id="content" role="main"> <div id="shadow"> </div> <div class="breadcrumbs"> <?php if(function_exists('bcn_display')) { bcn_display(); } ?> </div> <?php query_posts(array('post_type'=>'smile')); ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <table> <tr> <?php foreach(get_cfm('Smile',$custom_post_type->ID) as $image): ?> <td><img src="<?php echo $image->smile_url; ?>" width="200" alt="<?php echo $image->smile_alt; ?>" /></td> <td><?php echo $image->smile_caption; ?></td> <?php endforeach; ?> </tr> </table> <div class="entry-content"> <?php the_content(); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?> </div><!-- .entry-content --> </div><!-- #post-## --> <?php comments_template( '', true ); ?> <?php //endwhile; // end of the loop. ?> </div><!-- #content --> </div><!-- #container --> <?php get_sidebar(); ?> <?php get_footer(); ?>
Wow, that was fast. One teensy bit of code between a great plugin and amazing service. I’ll need to post the code, because I’m getting the same result. One quick question, though. Should I have registered the plugin anywhere? My server does not always accept WordPress writing to the server. I can’t see where that could come into play, but thought I should mention it.
I am getting the same error. I’m using version 1.1 of the plugin, with WordPress 3.1.
Warning: Invalid argument supplied for foreach() etc<table> <tr> <?php foreach(get_cf_matrix('Smile') as $image): ?> <td><img src="<?php echo $image->smile_url; ?>" width="200" alt="<?php echo $image->smile_alt; ?>" /></td> <td><?php echo $image->smile_caption; ?></td> <?php endforeach; ?> </tr> </table>
That is the code I have in my custom template. I’m using a custom post type, but I’m not sure that is affecting anything. I have a query for the custom post type, but I get the same result when I use the query or not. I did change the column titles, and used copy and paste to make sure they are the same as I have set up. “Smile” is the title of the matrix I set up.
I’m out of things to try. I’m convinced this is exactly what I need, but I’m close to giving up. Any ideas?
Change to line 135 in more-types-object.php worked for me, too. Thanks for the fix to the only problem I had moving to 3.1.