• I happen to love this plugin. It’s very handy. If I wanted to create a new template that would pull in three custom fields in addition to the other options, is that possible with this plugin? I would need to find someone to help me, but if it’s not possible I won’t even bother. I figured out how to pull custom fields into a category template, but would like to add them as an option using this plugin for the end user.

Viewing 11 replies - 16 through 26 (of 26 total)
  • Plugin Author Fernando Briano

    (@fernandobt)

    I’m glad I could help!

    Version 0.16.1 is already available on www.remarpro.com, so it shouldn’t be long before your dashboard tells you about the update. Please let me know if everything went back to normal.

    It’s really important when users report issues, because I can’t always test every possible option. So thanks again, and if there’s any more bug reports, ideas or comments on the plugin, please don’t hesitate to contact me on this forum.

    Regards

    You’re the MAN!!! I already saw the update alert in the WP Admin Dashboard. Upgraded it. Can’t wait for you to edit the documentation to know how the custom field stuff I described works!

    Thank you very much, Fernando. I’ll report back with any successes or bugs

    it worked! wonderful! thank-you so much!

    Plugin Author Fernando Briano

    (@fernandobt)

    VixWP check the README file for documentation on how to use the custom field feature.

    I think it’s already updated on the WordPress site with version 0.16.1, but for some reason the site is sometimes not taking the README file changes to display.

    ortixia: Awesome! Glad to know! Let me know of any further comments or errors.

    Thanks for using the plugin and reporting any issues everybody!

    HI Fernando,
    I want to say that your help is precious and this is how real professional developer are, always ready to listen to their user and fast in solving issues! ?? Thanks!

    In the meantime my problem has not been solved by the new release.
    I’ll try to create a little background behind my issue.

    I’ve developed the website of an art painter. He’s got hundreds of artworks which are collected in galleries. So I created one post for every artwork, with the artwork itself added as “Featured Image”. Then I created one page for every gallery which consists of:
    – a text, which introduce to the concept behind the gallery
    – the thumbnails of the posts related artworks
    These thumbnails are provided by your plugin, which is called by this line:

    [catlist name=dreamcatchers orderby=rand numberposts=-1 thumbnails=yes]

    (I added “thumbnails=yes” in the last few days, trying to solve the issue I have. When I created the website, it was not present and thumbs where visible anyway)

    This is the page of one of the galleries:
    https://www.mondomultiplo.com/galleria/dreamcatchers

    The website is up since the beginning of december, and for the first month and a half everything was smooth. The only problem I had was that with your plugin installed I could not login in the wordpress admin pages, so I had to disable it through FTP every time I wanted to change something, and it was a little frustrating.

    Some days ago, 7, 10, I don’t remember you published an upgrade which addressed just this login problem and I installed it immediately but, since then, the thumbnails disappeared.

    I tried everything I could, which is not much, and they didn’t reappear.
    For instance:
    – I added the “thumbnails=yes” command, no change
    – I removed the artwork from the “featured image” and put it in the post, no change
    – I even tried to downgrade to older versions of the plugin and nothing changed again, which is very very weird. How is it possible?

    Do you have any idea on what I have to do to solve this?
    I’m sorry to press you but my client is quite upset and I don’t know what to do.
    Thanks again for your precious help!
    Sincerely
    Enrico

    Plugin Author Fernando Briano

    (@fernandobt)

    Enrico, I’m trying to figure out what could be going wrong with the plugin. As you described, it’s pretty weird.

    The plugin uses the the get_the_post_thumbnail function this way:

    if ( has_post_thumbnail($single->ID) ) {
    		$lcp_thumbnail = get_the_post_thumbnail($single->ID);
    	}

    The documentation for the function says:

    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.

    Note: To enable Post Thumbnails, the current theme must include add_theme_support( ‘post-thumbnails’ ); in its functions.php file. See also Post Thumbnails.

    First thing you should do is make sure your theme has thumbnails enabled (even more info).

    I’m guessing the plugin used to display the images as part of the post, but I’m not sure how it used to do it, now it doesn’t, and not even installing an older version.

    The other possibility I’ve been considering is using wp_get_attachment_image, which: returns an HTML image element representing an attachment file, if there is any, otherwise an empty string.

    Please, let me know about the thumbnail feature in your theme. We’ll get to fix this one way or the other ??
    Thanks!

    Fernando, thanks again for your help… but we’re not there yet ??
    The thumbnails function is “alive and kicking” in functions.php.
    If you click on “artwork” in the menu you see it working.

    Meanwhile I’ve checked some fundamentals I’ve not yet tried like:
    – disabling every other plugin
    – repairing permissions
    – replace the theme files completely
    – replace the wordpress files completely

    No results yet.

    It’s so incredibly weird. I’m in computers since commodore 64 and I know they are “moody” sometimes, but it’s too much. I guess the reason is under my eyes and I cannot see it…

    Plugin Author Fernando Briano

    (@fernandobt)

    enricofra sorry I didn’t notice this earlier…

    Try:
    thumbnail=yes
    instead of
    thumbnails=yes

    There was an update notice:

    == Upgrade Notice ==

    = 0.13.2 =
    Thumbnail parameter ‘thumbnails’ changed to ‘thumbnail.

    Doe3

    (@doe3)

    I have the same problem. If I use thumbnail=yes no thumbnail is displayed, if I use thumbnail=yes the page where I use the shortcode is empty, not even the sidebar is showing. It’s really weird.
    Any ideas?

    Anyone mind sharing a code example of how to display custom fields? Readme and website are too vague imo. Thanks.

    I’m working on my new WP site, so I’ll share what I know, Nowton.

    I’ve written a lot of book reviews, and in Expression Engine, I had custom fields set up so I could type in the book’s title, the author, the Amazon link and a combined author/title.

    This allowed me to place the combined author/title at the top of the review, insert the Amazon link (which was the book cover and text) into the review, off to one side, and on a separate page create lists of books by title and author (the names had to be last name then first name, which is why it seems like I duplicated my effort.

    Here’s the link to my book review page using EE coding. Amazon is retooling its links, so you might not see it (and eventually, the EE page will go away once the WP part of the site goes live).

    So, in porting my site over to WP, I’m trying to replicate that. I couldn’t port over the custom fields (darn it), but I’m in the middle of figuring this out.

    With that out of the way, let me focus on one custom field and how it’s being used in the TwentyTen theme.

    1. Created a Custom Field called “Bookinfo (Title. Author.)”

    2. In the Appearance Editor, opened loop.php

    3. In the section where it begins <div class=”entry-content”>, I inserted this on the next line:

    <b><?php echo get_post_meta($post->ID, 'Bookinfo (Title. Author.)', true); ?></b>

    This placed the value of that Custom Field after the Title but before the book review. <b></b> bolded that line.

    (I think I had to add the single quotes because I didn’t use a simple value such as “basic”, but I needed to remind myself how to format the information.)

    4. To have the custom field display that information on a single-post page, I repeated step 3 to loop-single.php.

    (Coders: Feel free to jump in and correct me.)

    Now for the List Category Post plugin, I’ve been trying to make it create a page in which each category’s reviews are listed by the Custom Values of Booktitle.

    List Category Post creates links using the Title field, which I don’t want. It lists the Custom Values, but also the name of that value,

    So, I created a page and typed this in:

    Comic Books
    [catlist id=35 numberposts=-1 customfield_display=’Bookinfo (Title. Author.)’]

    And this is what I get:

    Comic Books
    * Al Columbia’s high-octane nightmare fuel
    Bookinfo (Title. Author.) : Pim & Francie: The Golden Bear Days.

    I want to get ride of the asterisk and the title and turn the Custom Value into a link like this:

    Pim & Francie: The Golden Bear Days.

    I figured out how to remove the value’s title. It’s in CatList.php, where you replace

    $lcp_customs .= "<div class=\"lcp-customfield\">" . $something. " : " . $value . "</div>";

    with

    $lcp_customs .= "<div class=\"lcp-customfield\">" . $value . "</div>";

    But I haven’t figured out how to turn my custom value into a link. Best I can tell, the answer is in CatListDisplayer, where these bits of code appear:

    private function get_custom_fields($custom_key, $post_id, $tag = null, $css_class = null){
            $info = $this->catlist->get_custom_fields($custom_key, $post_id);
            return $this->assign_style($info, $tag, $css_class);
        }
    
        private function get_post_title($single, $tag = null, $css_class = null){
            return '<a href="' . get_permalink($single->ID).'">' . $single->post_title . '</a>';
        }

    The link code (<a href=) is in the get_post_title function. My knowledge of PHP is on a par with open-heart surgery, so I’ve been moving code around, crashing the page, reloading the code — you know, clip the blue wire and see if the bomb blows up, so any ideas will be gratefully appropriated.

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘[Plugin: List category posts] Custom Fields in Templates?’ is closed to new replies.