Employee Custom Link not working

I would like to add a custom link to my Employee photo, but it’s not working.

Am I missing something? The site is here and every employee is linked to a site.

Another thing is how to add round to blockqoute’s image?

Thanks!

Hi Vlad,
and thank you for this beautiful theme.
I don0t know if i made something wrong, but after the last upgrade i have this result to my employees display widget:
http://www.michelizza.com
i mean, the dimensions of the featured images are so big…
and second problem is:
is it possible to insert the phone number and url address on employees infos?
i tried to insert them on Types, but there was no chances to see the logos on main page

Thank in advance, you get a beer !!

Giulio

Hi, efpandijc
to enable the custom link for employee’s photo, you need to edit a file under theme folder > widgets > fp-employees.php then the first you need to add this line:
$custom_link = get_post_meta( get_the_ID(), ‘wpcf-custom-link’, true );
then under has_post_thumbnail() change this line:

<?php elseif ( has_post_thumbnail() ) : ?>
<div class="employee-photo wow zoomInDown"><?php the_post_thumbnail('moesia-employees-thumb'); ?></div>
<?php endif; ?>

to:

<?php elseif ( has_post_thumbnail() ) : ?>
 <?php if ( $custom_link != '' ) : ?>
 <a href="<?php echo esc_url($custom_link); ?>">
 <?php endif; ?>
  <div class="employee-photo wow zoomInDown"><?php the_post_thumbnail('moesia-employees-thumb'); ?></div>
<?php if ( $custom_link != '' ) : ?>
 </a>
 <?php endif; ?>
<?php endif; ?>

see the picture here: http://prntscr.com/78dce0

Note that you should create child theme since changes will be lost on next theme update. If you decide to use child theme search forum for unregister_widget.

and to add rounded picture, you need to go to appearance > Editor edit the style.css
and change this line:

.employee-photo,
.employee-photo img {
	border-radius: 50px;
}

to:

.employee-photo,
.employee-photo img {
	border-radius: 70px;
}

I added the code, tried various links (with http, without…), it’s not working :confused:

And for the round corner, I want the image from blockqoute to be rounded, not the employees.

So still at the beginning :slight_smile:

Hi, efpandjic

Are you sure you edit the fp-employees.php? or have you fill the employee’s link? see here >> http://prntscr.com/78oq32
Maybe you can show me the fp-employees.php?

I’m sorry for rounded corner :stuck_out_tongue:
to add the rounded corner to image within the blockquote, you need to edit the style.css and add this line anywhere, but it’s better if you find this line:

blockquote {
	border: 0;
}

then add this bellow the script above:

blockquote img{
	border-radius: 70px !important;
}

Yes, I add the link to every employee. Here is the code

Hi, efpandjic

I am sorry for this inconvenient. I need you to go to Types > Custom fields > then choose Employees info and show me the capture of the fields. Is the Custom link field has slug name custom-link like this > http://prntscr.com/793q24 ?

or you can drop your username and password of your website to my email > awanrmb[at]gmail.com, so I can help you faster

Login details sent!

Hi michelizza,

It’s seems you are using Sydney-Pro themes, right?
I just check your website but I didn’t see your employees widget. I need to know the featured images of the employees.

then, you already add the custom fields from types and you need to display it to front page.
first, you need to open the file under theme folder > widgets > fp-employees.php and let say you give a slug name to your custom field with “phone” (http://prntscr.com/793wbd)
so in your fp-employees.php, you need to add this line:
$phone = get_post_meta( get_the_ID(), ‘wpcf-phone’, true );
http://prntscr.com/793z69

then add this line to display the phone:

<?php if ($phone != '') : ?>
 <span class="phone"><?php echo $phone; ?></span>
<?php endif; ?>

hi fpandjic,

thanks for the login details, but when I logged in to your site, I can access profile settings only.

I need to access the Types settings and the Appearance settings.

Sry, my bad! Forgot to grant you admin privileges :smiley: try now!

OK, the pictures already linked now.

I’m sorry because I give you wrong instruction. The custom link should be placed below the <?php if ($photo != ‘’) : ?> not below <?php elseif ( has_post_thumbnail() ) : ?> :stuck_out_tongue:

Then, if you want the link to open in new tab, you just need to add target="_blank" as attribute of the <a>. so, the script should be like this <a href="<?php echo esc_url($custom_link); ?>" target="_blank">

Best regards,
Awan

Thank you for your help!

I might also need help about the height size of site’s header, but will open a new thread for it if I don’t find a solution about it!

Hi Awan you’r right, i bought sydney pro.
it works well, but you have to understand me, this is not my job, just my hobby.
So, i made everything you told me, but i mean, i like to have an icon with “phone” inside the red screen of the empluyees.
Go and see employee Giulio now, and tell me please what have i do.

Another question, if i delete other fields like twitter, ggogleplus etc. is it enough to delete them from types?

in order to don’t loose the changes i made, could i save the information you give me and paste for next theme released?

Hi michelizza,

to move your employee’s phone to red screen and add phone icon, firstly you need to open fp-employees.php then remove this line:

<?php if ($phone != '') : ?>
 <span class="phone"><?php echo $phone; ?></span>
<?php endif; ?>

then add this line: (see this printscreen for the position of the new line http://prntscr.com/79uatp)
<?php if ($phone != '') : ?> <span class="phone"><i class="fa fa-phone"> </i> <?php echo $phone; ?></span> <?php endif; ?>

Yes, you can remove the unused input fields from Types > custom fields. Then if you want re-create the input fields, you can choose it from the available fields or user created fields http://prntscr.com/79ucnr

Thank you Awan,
now is better, just a small think does not work correctly. now the Facebook fa-icon is placed outside of frame…

Hi michelizza,

Oohh… I see. So, you need to open the style.css then change this line:

.roll-team .team-item .team-pop .team-info {
	top: 30%;
	position: relative;
	width: 100%;
}

to:

.roll-team .team-item .team-pop .team-info {
	top: 15%;
	position: relative;
	width: 100%;
}

and change this line also:

.roll-team .team-item .team-social {
	text-align: center;
	padding: 17px 0 0;
	margin: 0;
}

to:

.roll-team .team-item .team-social {
	text-align: center;
	padding: 5px 0 0;
	margin: 0;
}

And for close this topic, i need to insert also the employee’s email that i created in types.
Thank you for your prompt answers and have a nice day!

Glad to help you guys. feel free to ask here if you need any help :slight_smile:

Regards
Awan

Hi Awan,
i upload the new version of sydney theme, i made the same changes you send to me and now my site is gone,

anything to do?

Please, answer to me as soon as possible