zymeth25
Forum Replies Created
-
Forum: Plugins
In reply to: [List category posts] Latest update broke pluginHello @paulhyland
Are you absolutely sure both websites use the same shortcode? Because if that is the case then the answer is simple: what you see on your staging website is the default and expected output of the shortcode you shared and what you see on your live site is a modified version of the plugin which outputs all the details in this particular way. I suppose someone (the site’s developer) could have modified the plugin’s code to work this way. Now, when you update the plugin, it downloads a ‘clean’ version, without all your custom changes, and overwrites whatever was there before, hence your website becomes broken. This is how all WP plugin updates work and this is why it is never recommended to alter a plugin’s code unless there’s no other way.
But here, with this plugin, there is a much better way – you can use templates. If instead you used
[catlist post_type=”blogs” numberposts=3 pagination=yes template=mytemplate]
and followed the documentation to create a filemytemplate.php
containing all the customizations you need, nothing would get lost when you update the plugin.Forum: Plugins
In reply to: [List category posts] Pagination is not workingThe JavaScript that interferes with pagination links is in the files belonging to the WordPress theme you are using. I suggest asking your theme’s developer for support on this.
Forum: Plugins
In reply to: [List category posts] Pagination is not workingHi @nangttt, it seems to be an issue with the JavaScript you use on your website, not with the plugin itself. When I load your site with JavaScript disabled, pagination works without a problem.
Forum: Plugins
In reply to: [List category posts] Pagination does not workGlad it worked, you can mark this as resolved.
Forum: Plugins
In reply to: [List category posts] Pagination does not workI assume you turned the pagination on in the backend options and you are not using the shortcode parameter
pagination=yes
.This issue has already been resolved and will be fixed in the next release. For now you can add
pagination=yes
to your shortcode and it will fix the problem.Forum: Plugins
In reply to: [List category posts] How to make text be in the middle of thumbnail?@steelhard try using
thumbnail_class
parameter as described in the documentation. Then you can customize the placement however you want with CSS.Forum: Plugins
In reply to: [List category posts] starting_with not workYou are right @spikketto,
starting_with
doesn’t work on some servers. This is because of this upgrade in WordPress core. We should make the plugin compatible with utf8mb4.@fernandobt I think we should change the
starting_with
method inlcp-parameters.php
so that it checks if the tables areutf8
orutf8mb4
and then useCOLLATE UTF8_GENERAL_CI
orCOLLATE UTF8MB4_GENERAL_CI
respectively.This is the error message I get when using [catlist starting_with=”a”] with utf8mb4 database tables:
WordPress database error: [COLLATION 'UTF8_GENERAL_CI' is not valid for CHARACTER SET 'utf8mb4'] SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'post' AND ((wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private'))AND (wp_posts.post_title COLLATE UTF8_GENERAL_CI LIKE 'a%') ORDER BY wp_posts.post_date DESC LIMIT 0, 10
Give some more details if you want to get support. What is the shortcode you are using?
Forum: Plugins
In reply to: [List category posts] Adding category class if more categories selectedFirst of all, using categories as id is a very bad idea because many posts can have same category. Only one HTML element should have a given id, but same class can be assigned to many different elements. So I suggest you use classes only for this purpose.
Now, this code should do just what you want (inside The Loop):
$categories = get_the_category(); $lcp_display_output .= '<li class="' . $categories[0]->slug . '">';
Forum: Plugins
In reply to: [List category posts] Start with … 2 wordsHello @emanuelcelano
No, this is not possible.
starting_with
can only by used to “Get posts whose title starts with a certain letter”.Forum: Plugins
In reply to: [List category posts] Adding category class if more categories selectedHi @vanw,
Right now it is only possible to do this with post tags, using the
tags_as_class
shortcode parameter. It is not possible to do what you want with the shortcode only, but you could do it using a custom template.Forum: Plugins
In reply to: [List category posts] Add custom shortcode into the templateOk @olessons, I had a closer look at your website and the code you have shared. First, there are a couple things you need to fix:
- This line doesn’t work:
$lcp_display_output .= $this->get_post_title($post, 'lcp_post');
, I assume you wantedlcp_post
to be a class, but you forgot to pass html tag as an argument. If you would like the title to be wrapped withh1
you could try this:$lcp_display_output .= $this->get_post_title($post, 'h1', 'lcp_post');
- You have a bug on this line:
$lcp_display_output .= '<div class="web-div-inner"';
, you forgot about>
, please change it to$lcp_display_output .= '<div class="web-div-inner">';
Now, to fix your positioning problem I have to say this has nothing to do with List Category Posts, the problem is you chose a wrong shortcode from the ones described in rating widget documentation. You chose
rw_the_post_rating
which OUTPUTS the rating, what you should have used isrw_get_post_rating
which RETURNS the rating.To resolve all your issues, first fix the 2 problems I described and then try your template with
rw_get_post_rating
.- This reply was modified 7 years, 2 months ago by zymeth25.
- This reply was modified 7 years, 2 months ago by zymeth25.
- This reply was modified 7 years, 2 months ago by zymeth25.
- This reply was modified 7 years, 2 months ago by zymeth25.
- This reply was modified 7 years, 2 months ago by zymeth25.
- This reply was modified 7 years, 2 months ago by Kathryn Presner.
- This reply was modified 7 years, 2 months ago by zymeth25.
Forum: Plugins
In reply to: [List category posts] Add custom shortcode into the templateHi @olessons
So the code you inserted into your template works, that is good, now you only need to adjust the placement so that the end result is exactly what you want.
To display your ratings below each list element you can insert a
<br>
tag before your custom code:$lcp_display_output .= '<br>' . rw_the_post_rating();
Or you could wrap your custom code with additional tags and then style the result with css:
$lcp_display_output .= '<div class="example">' . rw_the_post_rating() . '</div>';
Hope this is helpful.
- This reply was modified 7 years, 2 months ago by zymeth25.
Forum: Plugins
In reply to: [List category posts] Not Filtering Categories@makenaw Have you tried disabling all other plugins and checking if it works with only LCP enabled?
Forum: Plugins
In reply to: [List category posts] Update 0.75 Does not Work@hiskingdomprophecy What do you mean by “new posts”? Are you referring to the posts you added after you’d updated the plugin?
- This line doesn’t work: