• Hi,

    I like this plugin a lot, the only bad thing for me is that I have a single page website. It allows me to use HTML shortcodes but if I add a shortcode like: [fb_album id=”1446384158937922″ wp_photos=”true”] then it shows exactly that on the webpage. The theme I’m using is called Retro Portfolio.

    Is it possible for you to also make PHP shortcodes or explain me how I would be able to show the albums in a different way?

    This plugin has PHP shortcodes: Cyclone Slider
    See below:

    [cycloneslider id="albumname"]
    <?php if( function_exists('cyclone_slider') ) cyclone_slider('albumname'); ?>

    Thank you very much in advance.

    https://wordpress.org/plugins/fb-photo-sync/

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

    (@jstoker)

    Update:
    I have found it:
    <?php echo do_shortcode(‘[fb_album id=”1446384158937922″ wp_photos=”true”]’); ?>

    Is there a way to show all albums in one shortcode?

    Plugin Author Mike Auteri

    (@mauteri)

    Maybe try something like this:

    <?php
    global $wpdb;

    $query = $wpdb->prepare( “
    SELECT option_name
    FROM {$wpdb->options}
    WHERE
    option_name LIKE %s
    “, ‘fbps_album_%’ );

    $albums = $wpdb->get_results( $query );
    foreach( $albums as $album ) {
    $id = str_replace(‘fbps_album_’, ”, $album->option_name);
    echo do_shortcode(‘[fb_album id=” ‘ . esc_attr( $id ) . ‘ ” wp_photos=”true”]’);
    }

    Plugin Author Mike Auteri

    (@mauteri)

    FYI, I didn’t test the code above, so there MAY be a typo 🙂

    Thread Starter jstoker

    (@jstoker)

    If found out I could just use:
    <?php echo do_shortcode(‘[fb_album id=”” wp_photos=”true”][fb_album id=”” wp_photos=”true”][fb_album id=”” wp_photos=”true”][fb_album id=”” wp_photos=”true”][fb_album id=”” wp_photos=”true”][fb_album id=”” wp_photos=”true”][fb_album id=”” wp_photos=”true”][fb_album id=”” wp_photos=”true”][fb_album id=”” wp_photos=”true”]’); ?>

    It works perfect.

    Altough it isn’t displaying exactly as I wanted it to display.
    I thought it would display just like the Facebook albums, but all albums show all pictures directly.

    Do you think it is possible to make an option to display 1 photo and when you click the album it goes to a lightbox slideshow? Like Facebook does.

    Plugin Author Mike Auteri

    (@mauteri)

    Actually, that display is on my list of things to add to the plugin.

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

The topic ‘Working with 1-Page Themes’ is closed to new replies.