Tag Info

Hot answers tagged

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

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

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 ...


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

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

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~


1

Since version 0.23 of the List Category Posts plugin, you can set specific html tags and CSS for each element of the list. In you case you would do something like this: title_tag=span title_class=lcp_post title This will look like this in your page: <li> <span class="lcp_post_title"> <a ...


1

You could enable links, images and other tags for use with the_excerpt. This might be the most simple solution, but it will apply to all excerpts: <?php function my_excerpt_custom($text) { $raw_excerpt = $text; if ( '' == $text ) { $text = get_the_content(''); $text = strip_shortcodes( $text ); $text = apply_filters('the_content', $text); ...


1

I'm not quite sure why your template changes aren't taking -- it looks like you're doing what you should. If you'd like to fix the problem via CSS, adding these rules to your styles.css file would make that page look nice: .lcp_catlist li { margin: 0; list-style: none; } .lcp_catlist li img { margin: 5px 10px; float: left; }


1

It uses the get_the_post_thumbnail function: Gets Post Thumbnail as set in post's or page's edit screen and returns an HTML image element representing a Post Thumbnail, if there is any, otherwise an empty string. The other options you mention are not included in the plugin now, but they will be considered for future versions.


1

Actually, I should include this as an option on the plugin. Right now the code looks like this: $info = '<a href="' . get_permalink($single->ID).'" >' . $single->post_title . '</a>'; So this generates a simple link: <a href="yourpost.html">Post Title</a> I'll see what I can do on a next version to make this customizable, ...


1

I believe so. I think this is the plugin you're using: https://github.com/picandocodigo/List-Category-Posts The doc says you can use excludeposts, so you'd use: [catlist categorypage=yes post_type=page excludeposts=<ID_OF_PAGE>]


1

If you want to do this for every link from List Category Posts, you can add this to your theme's css file: .lcp_catlist a { text-decoration: underline; } Check this answer for more details on new features that can help you customize even more: Since version 0.23 of the List Category Posts plugin, you can set specific html tags and CSS for each ...


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

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.


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

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

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

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

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

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

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. ...



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