• Resolved beer78

    (@beer78)


    I like your recommendations widget. Thanks,

    I have two questions. My website won’t show the linkedin profile picture of the person who wrotes the recommendation. and sometimes the name and link to the person is not displayed.

    I have seen (recommendations.php):
    <a>recommender->publicProfileUrl); ?>"

    and i have entered 10000 characters for the length in the widget settings

    http://www.hoffoto.nl

    http://wordpress.org/plugins/wp-linkedin/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Claude Vedovini

    (@cvedovini)

    My website won’t show the linkedin profile picture of the person who wrotes the recommendation.

    The default template doesn’t show the recommender’s picture, you’ll need to write a custom template to do that. See that article.

    sometimes the name and link to the person is not displayed.

    because their LinkedIn profile is not public. (recommender->publicProfileUrl is not defined)

    Thread Starter beer78

    (@beer78)

    Allright I will understdand the public profile issue (stupid me)

    But i’m still working on the picture issue. I’ve read your article of adding the php files to my profile. It’s done. In the article is also written to add some lines in the recoomendations.php file. Thats’done too.

    But still no picture. The picture is public.

    My code is like:

    <?php
    	wp_enqueue_script('responsive-scrollable');
    	shuffle($recommendations);
    ?>
    <div class="linkedin">
    	<div class="scrollable"
    		data-width="<?php echo $width; ?>" data-interval="<?php  echo $interval; ?>"
    		style='width:<?php echo (is_numeric($width)) ? "{$width}px" : '100%'; ?>'>
    		<div class="items">
    
    <div class="recommender"><a href="<?php echo $recommendation- rel="nofollow">recommender->publicProfileUrl; ?>"
        target="_blank"><?php echo $recommendation->recommender->firstName; ?> <?php echo $recommendation->recommender->lastName; ?></a>
        <?php if (isset($recommendation->recommender->headline)) echo ' - ' . $recommendation->recommender->headline; ?>
    </div>
    
    		<?php foreach ($recommendations as $recommendation): ?>
    			<blockquote>
    				<div class="recommendation"><?php echo nl2br(wp_linkedin_excerpt($recommendation->recommendationText, $length)); ?></div>
    				<div class="recommender"><?php if (isset($recommendation->recommender->publicProfileUrl)): ?>
    					<a href="<?php echo esc_url($recommendation->recommender->publicProfileUrl); ?>"
    						target="_blank"><?php echo $recommendation->recommender->firstName; ?>
    						<?php echo $recommendation->recommender->lastName; ?></a>
    					<?php else: ?>
    					<?php _e('Anonymous', 'wp-linkedin'); ?>
    				<?php endif; ?></div>
    			</blockquote>
    		<?php  endforeach; ?>
    		</div>
    	</div>
    </div>
    Plugin Author Claude Vedovini

    (@cvedovini)

    ok, I see the problem. I though you were talking about the profile.

    right now you can customize the template of the recommendations widget but you cannot add other fields. You would need to add the recommender’s picture and headline to the list of fields that are fetched but this list is not editable (unless you directly edit the plugin’s file, but this is not recommended and I am not even sure the API would provide them)

    Plugin Author Claude Vedovini

    (@cvedovini)

    However, if you add the following line in your wp-config.php file you should be able to override that list. If you are in debug mode you will get a Notice from PHP because that constant is redefined in the plugin but it shouldn’t affect you in any way

    define('LINKEDIN_FIELDS_RECOMMENDATIONS', 'recommendations-received:(recommendation-text,recommender:(first-name,last-name,public-profile-url,headline,picture-url))');

    however there are errors in the PHP code you posted

    Plugin Author Claude Vedovini

    (@cvedovini)

    closing

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘No profile picture on recommendations’ is closed to new replies.