• Good afternoon,

    I’ve got a question. I’m working on a website at the moment for a friend who asked me for a favor. He has got a company and wants to expand to other countries, thus the reason he wants to have a second website (for his hopefully future foreign customers).

    All the plugins installed on the webpage are premium and legit !

    They’ve got Custom Facebook Feed (the premium version) and added three feeds to it.
    Now, what they want, is that registered users (subscribers) have either a page (preferred) or an option in their dashboard/’account overview’ with checkboxes so they can select whát to see from the feed.

    They also installed ACF (advanced custom fields) and WPuF (WP User Frontend).

    The initial idea was to let users decide which elements (industries/brands from the ACF plugin which they think or thought should work with the cff plugin) they want to see. It was explained to me this was possible with WPuF, but after trying countless ways, I was told by the devs from WPuF that this is NOT possible with théir plugin. They forwarded me to this plugin’s support page, hence the reason I’m asking here:

    Is this possible (the checkboxes) with the CFF plugin and how do I do it or where do I find the options to fill it up ? I can’t find it.

    Thanks in advance.

    I’ve been building websites since 2001, mostly graphically as I’m a graphics designer (just like my grandfather who did it with a pencil haha) and not a die-hard html/php coding expert.

    With regards,
    Youri
    – Pr1nceHapi
    – HLDezine

    [edit]
    We’re using the ENFOLD premium theme.
    All plugins and WP are up to date.

    • This topic was modified 7 years, 8 months ago by Pr1nceHapi. Reason: additional info added
    • This topic was modified 7 years, 8 months ago by Pr1nceHapi.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author smashballoon

    (@smashballoon)

    Hey @pr1ncehapi,

    This is possible to do using our shortcode options – specifically the “include” shortcode option which allows you to choose what to show/hide in the feed. If you’re using the ACF plugin then you can just get the settings fields in your PHP template file and then set the shortcode options in our plugin accordingly in order to hide/show certain parts of the feed. For example:

    <?php
    //Get the ACF fields
    $show_author = get_field( "show_author" );
    $show_text = get_field( "show_text" );
    //etc...
    
    //Set the "include" variable
    $include_var = '';
    if( $show_author ) $include_var .= "author,";
    if( $show_text ) $include_var .= "text,";
    //etc...
    
    //Add the "include" setting to the shortcode and display the feed
    echo do_shortcode('[custom-facebook-feed include="'.$include_var.'"]');
    ?>

    Let me know whether that makes sense.

    John

    Thread Starter Pr1nceHapi

    (@pr1ncehapi)

    Hi Smashballoon,

    Sorry for the late reply due to family circumstances.
    Using the Enfold theme, do I add the code above in the theme file ?

    Thanks.

    Plugin Author smashballoon

    (@smashballoon)

    Hi @pr1ncehapi,

    You’d need to add that code into the PHP template file of wherever you want the feed to be displayed. So if you want it on your home page then open your theme’s home page template file (usually called “home.php”) and then add it to where you want the feed to be displayed. If you want it in the footer then add it to footer.php.

    You’ll obviously need to change the ACF field names in the code to match the names of your fields, and add in any additional parts of the feed that you want to show/hide where it says //etc...

    Let me know whether that helps.

    John

    Thread Starter Pr1nceHapi

    (@pr1ncehapi)

    Hey John,

    I’m completely lost. I need it to work tomorrow at around 1300 hours (amsterdam timezone).

    The overview in the ACF plugin:
    https://prntscr.com/eqgxgm (screenshot .. although they want it from the facebook feed, which shows names such as [Media Markt NL], [App Store], [De Valk Yacht Brokers], [Dappermarkt Amsterdam], [Microsoft] etc)

    The theme used is Enfold Child-theme.

    In the Style.css, I’ve added some code as you exampled above, but nothing is showing up.

    Is it possible for you to write me a working code ?

    Once it does work, I’m interested in purchasing the CFF-plugin myself, as I operate a website for an online gaming network, in which we (the team) want to display feeds as well within 3-4 months due to our sponsordeals).

    Thanks in advance.

    PS: we want it to show up in the dashboard, any idea how that’s done ? If not, then the footer area is okay too !

    • This reply was modified 7 years, 7 months ago by Pr1nceHapi.
    Plugin Author smashballoon

    (@smashballoon)

    Hey @pr1ncehapi,

    It’s beyond the scope of our technical support to write code for custom integrations like this, but the code in my first response should be pretty close to what you need. It may be best to consult with a web developer who can help to create the custom solution for you based on your exact requirements as it’s not really possible for me to write completely integrated and working code for you I’m afraid.

    Sorry about that! If you have any further questions though then just let me know.

    John

    Thread Starter Pr1nceHapi

    (@pr1ncehapi)

    Hmm, okay. I understand that, John.

    And how about we skip ACF and just use a checkbox setting for the custom facebook feed itself via, lets say, the footer or better, on a single page ?

    What code should I then use ?

    • This reply was modified 7 years, 7 months ago by Pr1nceHapi.
    Plugin Author smashballoon

    (@smashballoon)

    It depends on where the checkboxes are that you’re referring to. If you’re using the checkboxes that are within our plugin’s “Customize” page then to display the feed in the footer or page you just use the [custom-facebook-feed] shortcode. If you’re displaying it within a page template itself then you’d need to use the “do_shortcode” WordPress function in the PHP, like so:

    <?php echo do_shortcode('[custom-facebook-feed]'); ?>

    If you’re using custom checkboxes that are part of your site, or a custom field as part of ACF or another plugin, then first you need to get the values of those checkboxes and you can then parse them and add them to our shortcode “include” option (as shown in my initial example). This setting controls what’s shown/hidden in the feed. For example;

    [custom-facebook-feed include="text,desc,date,author"]

    So if you have custom checkboxes on your site then you’d need to get the values from those checkboxes and then add them into the shortcode:

    <?php
    //Get the checkbox values
    $show_author = get_option( "checkbox_1" );
    $show_text = get_option( "checkbox_2" );
    $show_datet = get_option( "checkbox_3" );
    //etc...
    
    //Set the "include" variable
    $include_var = '';
    if( $show_author ) $include_var .= "author,";
    if( $show_text ) $include_var .= "text,";
    if( $show_date ) $include_var .= "date,";
    //etc...
    
    //Add the "include" setting to the shortcode and display the feed
    echo do_shortcode('[custom-facebook-feed include="'.$include_var.'"]');
    ?>

    The first part of the code will depend on how your checkboxes are set up and how you get those values.
    The second part creates the “include” shortcode setting value.
    The third part adds the setting value into the shortcode.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Checkboxes for users (profile / page) from feed elements’ is closed to new replies.