Forum Replies Created

Viewing 15 replies - 61 through 75 (of 104 total)
  • Hi,

    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”><?php

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

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

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

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

    Hi, 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.]

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

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

    Hi,

    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.

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

    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)

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

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

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

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

Viewing 15 replies - 61 through 75 (of 104 total)