Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Bill_Peschel

    (@bill_peschel)

    Just downloaded the updated plug-in and it’s working fine. I’m looking forward to seeing what it does. I’m already impressed with the multiple help buttons on the settings page. I wish more plug-in designers would use this to help us non-designers / programmers understand what they do!

    Thread Starter Bill_Peschel

    (@bill_peschel)

    You’re welcome, and thanks for your fast response! I’ll make a note in my tickler to check your plugin out again.

    Thread Starter Bill_Peschel

    (@bill_peschel)

    It’s hostgator and they use according to cPanel 5.4.45.

    Thanks for replying.

    Oh, this explains it wonderfully! It solved a big mess when I couldn’t get the pages to work using the Parent Menu on the Edit Page.

    This is a wonderful fix, but somehow this needs to be better explained.

    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 5 replies - 1 through 5 (of 5 total)