AACT
Forum Replies Created
-
Forum: Plugins
In reply to: [List category posts] Settings Page doesn't workHi,
Yes this does seem to be a bug, see:
<?php”>https://www.ads-software.com/support/topic/bug-in-settingslist-category-posts-v051?replies=1
It looks as though it is a straight mistake in /include/lcp-options.php (around line 25 in LCP v0.51) where the line:
<form method=”post” action=”lcp-options.php”><?phpshould be:
<form method=”post” action=”options.php”><?php[ie it should be calling the wp-admin/options.php, not calling an LCP file at that point.]
Forum: Plugins
In reply to: [List category posts] customfield_display in custom template***CORRECTION***
sorry, the author has also changed the way the post id is send to get_custom_fields so your new line should be:
$lcp_display_output .= $this->get_custom_fields($single);ie without the ->ID (he now picks up the info about whether customfields are to be displayed from the object, so you don’t need to send the parameters separately).
Forum: Plugins
In reply to: [List category posts] customfield_display not working***CORRECTION***
sorry, the author has also changed the way the post id is send to get_custom_fields so your new line should be:
$lcp_display_output .= $this->get_custom_fields($single);ie without the ->ID (he now picks up the info about whether customfields are to be displayed from the object, so you don’t need to send the parameters separately).
Forum: Plugins
In reply to: [List category posts] Pulling Custom Field Not working***CORRECTION***
sorry, the author has also changed the way the post id is send to get_custom_fields so your new line should be:
$lcp_display_output .= $this->get_custom_fields($single);ie without the ->ID (he now picks up the info about whether customfields are to be displayed from the object, so you don’t need to send the parameters separately).
Forum: Plugins
In reply to: [List category posts] Pulling Custom Field Not workingHi, several people have noticed this.
I think I’ve just found the problem and here’s the response I’ve put to the other threads. Hope it helps:
I’ve found a bug in the LCP version 0.51 lcp-catlistdisplayer.php code.
In an older version which I have the get_custom_fields function used to have several parameters, the first of which was the setting of customfield_display. For some reason, the author has removed that and the function now only has the post_id as a parameter passed to it.For a quick fix if you change this line in your template:
$lcp_display_output .= $this->get_custom_fields($this->params[‘customfield_display’], $single->ID);to
$lcp_display_output .= $this->get_custom_fields($single->ID);you may find it works. Let us know, because there must be hundreds, if not thousands, of templates that are now broken.
[As an afterthought, you may be better off having both lines in your template as that will allow you to go back or forward on versions, and help if the author goes back to the previous way of doing things.]
Forum: Plugins
In reply to: [List category posts] customfield_display not workingJust a thought, it may be sensible to leave both your old line in as well as put in the new line, just in case the author ever goes back to the old way (or you go back to an older version of the plugin).
Forum: Plugins
In reply to: [List category posts] customfield_display in custom templateJust a thought, it may be sensible to leave both your old line in as well as put in the new line, just in case the author ever goes back to the old way (or you go back to an older version of the plugin).
Forum: Plugins
In reply to: [List category posts] customfield_display in custom templateHi,
It seems that there has been a change in LCP v0.51 to the get_custom_posts function so it now takes only one parameter. I’ve replied to a similar query just now and reproduce the reply here as you may find the quick fix helps you at least for now:
I’ve found a bug in the LCP version 0.51 lcp-catlistdisplayer.php code.
In an older version which I have the get_custom_fields function used to have several parameters, the first of which was the setting of customfield_display. For some reason, the author has removed that and the function now only has the post_id as a parameter passed to it.For a quick fix if you change this line in your template:
$lcp_display_output .= $this->get_custom_fields($this->params[‘customfield_display’], $single->ID);to
$lcp_display_output .= $this->get_custom_fields($single->ID);you may find it works. Let us know, because there must be hundreds, if not thousands, of templates that are now broken.
Forum: Plugins
In reply to: [List category posts] customfield_display not workingHi, I don’t think you did anything wrong.
I’ve found a bug in the LCP version 0.51 lcp-catlistdisplayer.php code.
In an older version which I have the get_custom_fields function used to have several parameters, the first of which was the setting of customfield_display. For some reason, the author has removed that and the function now only has the post_id as a parameter passed to it.For a quick fix if you change this line in your template:
$lcp_display_output .= $this->get_custom_fields($this->params[‘customfield_display’], $single->ID);to
$lcp_display_output .= $this->get_custom_fields($single->ID);you may find it works. Let us know, because there must be hundreds, if not thousands, of templates that are now broken.
Forum: Plugins
In reply to: [List category posts] How to apply the shortcode catlist in all posts?Hi, have you tried using single.php in your (child) theme which would put out the same for each post? (e.g. using do_shortcode(…) if necessary)
Forum: Plugins
In reply to: [List category posts] Date RangeHi,
I guess since this was a month ago you may have solved it, but just in case not, I’ve just done something similar – introduced two new parameters, before and after (in lcp-cat-posts.php, in the default settings: ‘before’ =>”,after=>”,)Then in include/lcp-catlist.php just before LCP makes the query (look for $query = new WP_Query;) I’ve added the query I want to the $args. See WordPress Codex WP Query for details of the various parameters. Here’s an example:
$args[‘date_query’]=array(
‘relation’ => ‘OR’,
array(
‘column’ => ‘post_date_gmt’,
‘after’ => $this->params[‘after’],
‘before’ => $this->params[‘before’]
),
array(
‘column’ => ‘post_modified_gmt’,
‘after’ => $this->params[‘after’],
‘before’ => $this->params[‘before’]
),
‘inclusive’ => true,
);
Hope this helps. Will be interested to learn if there are other ways of doing it as hacking the plugin code is not great from the point of view of maintainability.Forum: Plugins
In reply to: [List category posts] Thumbnails are not like squaresHi,
I don’t fully understand how thumbnails work, but I noticed that your theme is setting:img { height: auto; /* Make sure images are scaled correctly. */ max-width: 100%; /* Adhere to container width. */ }
so your pictures are keeping their aspect ratios. That is, it’s doing its best not to distort your pictures.
Forum: Plugins
In reply to: [List category posts] Setting font size for H1, H2, H3 & H4Hi, could you show a little more of what you are doing?
1. your definition of the lcp_title class
2. your settings for h1
3. the [catlist….] call you are making?As far as I understand, LCP gives you the options to put classes and tags in for certain elements, but does not itself generate your css – whether inline or in a separate file.
Forum: Plugins
In reply to: [Advanced Custom Fields (ACF?)] Value not displayed on pageYou may find this useful
https://www.advancedcustomfields.com/resources/displaying-custom-field-values-in-your-theme/
Forum: Plugins
In reply to: [Advanced Custom Fields (ACF?)] Value not displayed on pageHi, by ‘nothing shows’ do you mean you don’t see the custom fields on the frontend?
Unless you have a theme that already understands Advanced Custom Fields fields (and I don’t know whether there are any or not), you need to alter your theme’s single.php and similar files to look for and output custom fields as well as the ordinary content of a post.