Tag Info

Hot answers tagged

3

Have you tried replacing get_thumbnail with: <a href="<?php the_permalink(); ?>" title="<?php the_title();?>"><?php the_post_thumbnail(); ?></a>


3

Wordpress does this automatically if you do http://yoursite.com/?cat=1+2 (where 1 and 2 is category ids) OR http://yoursite.com/?category_name=apples+oranges (where apples and oranges is the slugs) OR something like http://yoursite.com/category/apples+oranges


2

To format the overall list container use the class paramater: class - CSS class for the default UL generated by the plugin. Also, you can change the generated code to a div if you pass the parameter "div" to "template": [catlist template=div class=mygallerytheme] This will create something like: <div class="mygallerytheme"> <p>Post ...


2

You have two conflicting parameters in your shortcode: categorypage - Set it to "yes" if you want to list the posts from the current post's category. And id - To display posts from a category using the category's id. Ex: [catlist id=24]. You can include several categories: Ex: [catlist id=17,24,32] or exclude a category with the minus (-)


2

While Xufyan's answer will get the job done, it does cause your page loads to run an extra query and you might get some unpredictable behavior. Furthermore, it doesn't get to the root of your issue. If you're comfortable with PHP, open up your theme's functions.php file and enter this: add_filter('request', 'order_posts_by_title', 999 ); function ...


2

This plugin does allow theming. Check out the "Other Notes" tab in the plugin page. As far as making it sortable, your path of least resistance is to use javascript. Here's a jQuery plugin that will do (almost) all the work for you. Hope that helps! Cheers~


2

To get multiple categories working on List Category Posts, you need to separate them by comma like this: [catlist id=1,2] for Category ID, and [catlist name='Audi,Cadillac'] for Category Name. Please note that multiple categories for the name parameter was just added on version 0.20.5.


2

Not sure but i think you don't need to use commas , so try [catlist name=member-directory orderby=title order=ASC numberposts=-1]


2

Yes, I've asked for issues to be reported here, so that you can get answers from the larger community of WordPress users and developers at WordPress Answers. Regarding the issue, other user also reported it, and it is due to the webhost using PHP 4. Line 10 of CatListDisplayer.php declares a private attribute. PHP 4 doesn't have public, private or protected ...


2

Its a great plugin and i believe the developer is a member here. To use it simply create a new page and use the plugin's shortcode [catlist id=1] change 1 with the actual category id. to read more about its features and ways you can use it : http://foro.picandocodigo.net/discussion/251/list-category-posts-documentation/ and to use the plugins advanced ...


2

after a whole night of googling and test runs, I've resolved the matter by using List Category Posts' template. all I did was create another template (from the one provided by plugin) in a folder inside my theme's directory. Then i go in and edit the code by placing the show thumnail codes on top of the title codes, and Viola!, works like a charm. thanks ...


1

You can use get_post_meta(). This is the codex article: http://codex.wordpress.org/Function_Reference/get_post_meta It sounds like each of the custom field values you want to display would only contain one result (one country, one town etc). In that case you'd use something like this in your template, wherever you want to display the value: <?php if ( ...


1

Hey you just opened the plugin's tag on WordPress Answers :D Can you paste the code of the generated html? From what you describe, you are using it correctly, so I just want to see if the template is being loaded to detect if the problem is on the template side, or a bug on the plugin's code. UPDATE: Ok, I checked your template on a new WordPress install. ...


1

It's not an expected behavior for the plugin, though I could make the link something more generic. In the meantime, you can manually change the code on your CatListDisplayer.php file, search for this: private function get_post_title($single, $tag = null, $css_class = null){ return '<a href="' . get_permalink($single->ID).'">' . ...


1

In the category link URL, add he category ID. Then when you click the link, the page reads the $_GET variable and use this to fetch posts with that category. You can use get_posts.


1

This is a bit hacky, but you could create your own template and then reformat the date. start by creating a folder list-category-posts in your theme directory. copy the default.php template there from the plugin's templates folder, and rename it custom.php, or whatever you'd like. within that custom.php file, find the line: //Show the title and link to ...


1

Thank you for reporting on this issue. Regarding the template system, I once more updated it, thinking the new version is easier to the user. I know it still lacks a big rewrite to make it user-friendly. The underlying code is pretty much set to use any new idea for it. I added some upgrade notices for version 0.17 and 0.18. I guess it wasn't clear enough. ...


1

List Category Posts plugin uses get_posts to actually get the posts and its default post_status is publish and that is way you won't get any private posts. To "Fix" it you can edit the file named include/CatList.php of the plugin and add $lcp_query .= '&post_status=private'; before line 51 before $this->lcp_categories_posts = ...


1

If you're referring to the category title, if you check the documentation, you can see there's a parameter for that: catlink - Show the title of the category with a link to the category. Use the template system to customize its display using the variable $cat_link_string. Default is 'no'. Ex: [catlist catlink=yes]. The way it's programmed, it should ...


1

If you are referring to the List Category Posts plugin, it uses WordPress' native function to get the thumbnail get_the_post_thumbnail which produces: class="attachment-thumbnail wp-post-image" You should assign style to those classes. More info about that here. I'll be adding the thumbnail CSS class as a parameter since get_the_post_thumbnails has that ...


1

Pagination has been on the TODO list for a while, but I haven't had time to get to implement it yet. I would be glad to receive some code from the community on this one :) The only complexity I can think of right now is there can be more than one instance of the shortcode, so each one should have an id to pass via GET for the pagination parameters.


1

This feature was implemented on List Category Posts version 0.21 :) thumbnail_class - Set a CSS class to the thumbnail and style it.


1

Fernando, the plugin's developer, has graciously added the feature to a new version of the plugin. I'm impressed and very grateful.


1

get_the_time() takes the same format as the PHP date() function for its parameter. Thus, get_the_time('F d, Y') would produce January 09, 2012 for today.


1

The thumbnail size parameter was added to List Category Posts on version 0.19. You will now be able to use the thumbnail_size parameter and pass it either a string keyword (thumbnail, medium, large or full) or a 2-item array representing width and height in pixels, e.g. array(32,32) just like the native function.


1

Well... if you are asking if you can get the List category posts plugin to recognize the tag then you can use the "get_extended()" function in WordPress. Create a new List category template and then use the following code to get the part of the post before the more tag for display. $moreTag = get_extended($single->post_content); $beforeMore = ...


1

Without editing the plugin and/or the author adding a few filters here and there its not going to be possible, but a simple solution can be using this shortcode which does just about the same but with pagination


1

Generally when a plugin developer releases a bug, the best thing to do is report it to the developer. This way he can fix it himself and release another update. If this is not done and you go and fix it yourself, the next time you update, your changes could be overwritten or no longer valid.



Only top voted, non community-wiki answers of a minimum length are eligible