• Resolved table4five

    (@table4five)


    I just uploaded a new theme to my blog http://table4five.net, and I’m trying to put my Flickr badge in the sidebar. I will admit, I do not really know what I am doing with this code, but I am trying very hard to learn. This is what I think I need for the Flickr code:

    // photos
    sp_sidebar_open( “photos”, “<h2>Photos</h2>” );
    echo ‘

      ‘;
      wp_list_photos
      echo ‘

    ‘;
    sp_sidebar_close( );

    with the code for the Flickr badge going where it reads wp_list_photos. I put it right under the Archives list, but when I clicked Update File the sidebar disappeared except for this: Parse error: syntax error, unexpected ‘<‘ in

    Could someone please tell me what’s missing, or if I’m even on the right track? Also, could someone please recommend a BOOK I could get that I could use to teach myself this code so I can at least add things to the sidebar myself? Preferably something with the words “For Dummies” in it? Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Copy the content of the php file you’re having trouble with into a post on http://wordpress.pastebin.ca . Then post a link to your pastebin code here. This will allow people to look at it and tell you where the problem lies.

    As far as a book goes, I have no specific recommendations, however what you want to learn is “PHP”. If you know PHP to even a small degree, this sort of thing is very easy.

    Thread Starter table4five

    (@table4five)

    Otto, thank you so much for directing me to pastebin! What a great site. Here is the link to the post I created there:

    http://wordpress.pastebin.ca/307208

    I titled it “Sidebar File”, and then at the bottom is the Flickr Badge Code. If someone could show me how to incorporate the Flickr code into the sidebar code, I would be very grateful for the help. Thanks!

    Elizabeth

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Ah. Okay. Basically, you had it correct with your above code, except you should probably close the PHP and reopen it instead of doing an echo.

    sp_sidebar_open( "photos", "<h2>Photos</h2>" );
    ?>
    insert your flickr badge code here
    <?php
    sp_sidebar_close( );

    Thread Starter table4five

    (@table4five)

    Otto, thank you so much! This topic is resolved!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Help with code for Flickr badge’ is closed to new replies.