Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: 0.8.14, connectionsEntryList
- This topic has 4 replies, 2 voices, and was last updated 12 years ago by
Kyle Matthews.
-
AuthorPosts
-
08/05/2014 at 2:51 pm #299779
Kyle Matthews
GuestHello, rather than use a shortcode, I am trying to only use a few pieces of connections (name, image, and URL) in a loop which I will display in my theme using my own CSS/HTML/PHP.
I can’t seem to find any documentation on this. Am I able to do what I’m trying to? More to the point – is there somewhere that details the specifics of implementing this?
08/05/2014 at 4:26 pm #299785Kyle Matthews
GuestFWIW, I see I can create themes and use them in new shortcodes, but this isn’t what I want to do. I have a template which I want to embed the Connections loop in via PHP, not in the WP editor.
08/06/2014 at 11:29 am #299883Steven Zahm
Keymaster@ Kyle
Use the
connectionsEntryList()function. You can pass an associative array $atts. The array accepts all the same options as the shortcode does. The keys in the associative array would be the shortcode option names. Here’s an example:$atts = array( 'template' => 'card', 'order_by' => 'organization, department, sort_column', 'category' => '2', ); connectionsEntryList( $atts );Hope that helps you with your project.
08/06/2014 at 2:10 pm #299910Kyle Matthews
GuestI’ll check into it – I’m hoping to create a loop where I’m displaying the members, similar to how I do on another site with some custom post types.
<?php global $post; $args = array( 'numberposts' => 7, 'category' => 6 ); $myposts = get_posts( $args ); foreach( $myposts as $post ) : setup_postdata($post); ?> <li> <img src="<?php $pic = get_post_meta($post->ID, 'pic', true); if($pic != '') {echo "$pic";}?>" width="872" height="238" alt="<?php the_title(); ?>" /> <div class="info-block"> <span class="featured-kids">Featured Kids</span> <h2 class="txt-kidfeatured"><?php $nickname = get_post_meta($post->ID, 'nickname', true); if($nickname != '') {echo "$nickname";}?>.<a class="more" style="<?php $css = get_post_meta($post->ID, 'css', true); if($css != '') {echo "$css";}?>" href="<?php the_permalink(); ?>"> </a></h2> <div class="txt-kidblurb"><?php $blurb = get_post_meta($post->ID, 'blurb', true); if($blurb != '') {echo "$blurb";}?></div> </div> </li> <?php endforeach; ?>08/06/2014 at 2:45 pm #299911Kyle Matthews
GuestActually, I wound up using just that code and creating members as posts in a certain category.
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
