• Resolved clare99

    (@clare99)


    My footer has been set up to show a Li`nkedin, Twitter and Facebook logo if there is one saved into the contact details. I removed the dummy fake accounts that were put in by the developer as at the time we only had Linkedin so they did not show. However, now we have Facebook and Twitter saved into the contact details but they are not coming back up. Any ideas wehere I am going wrong?

    <!-- right column -->
    					<div class="col-md-4 text-center">
    						<div class="footer-social">
    							<h3>Stay connected</h3>
    							<ul class="list-unstyled">
    								<!--<li>
    									<a href=<?php if ( function_exists( 'contact_detail' ) ) { contact_detail( 'facebook' ); } ?>">
    										<span class="fa-stack fa-2x">
    											<i class="fa fa-circle fa-stack-2x"></i>
    											<i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
    										</span>
    									</a>
    								</li>
    								<li>
    									<a href="<?php if ( function_exists( 'contact_detail' ) ) { contact_detail( 'twitter' ); } ?>">
    										<span class="fa-stack fa-2x">
    											<i class="fa fa-circle fa-stack-2x"></i>
    											<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
    										</span>
    									</a>
    								</li>
    								<li>
    									<a href="<?php if ( function_exists( 'contact_detail' ) ) { contact_detail( 'google' ); } ?>">
    										<span class="fa-stack fa-2x">
    											<i class="fa fa-circle fa-stack-2x"></i>
    											<i class="fa fa-google-plus fa-stack-1x fa-inverse"></i>
    										</span>
    									</a>
    								</li>-->
    								<li>
    									<a href="<?php if ( function_exists( 'contact_detail' ) ) { contact_detail( 'linkedin' ); } ?>">
    										<span class="fa-stack fa-2x">
    											<i class="fa fa-circle fa-stack-2x"></i>
    											<i class="fa fa-linkedin fa-stack-1x fa-inverse"></i>
    										</span>
    									</a>
    								</li>
    							</ul>
    						</div>
    					</div>
    					<!-- end right column -->
    • This topic was modified 7 years, 12 months ago by clare99.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The if ( function_exists( 'contact_detail' ) ) only checks if there is a piece of code named “contact_detail”. It does not check if there are details saved in it.

    So if that function does exist, it is called. Look for that function in the theme (looks like theme code) and see where it is getting the details.
    If that function does not exist, nothing happens, but the Font Awesome icons are output regardless.

    Thread Starter clare99

    (@clare99)

    Thanks for the advice. Everything else seems to pull from the contact details in the settings as that is where everything is saved that does come up with no problem using that function (including Linkedin, phone, address and email). I temporarily added an extra letter to the postcode and it showed it up on the footer from the code instantly. Yet something different for the icons, despite all the profiles being saved in the same place. For some reason the ones not showing have all the code in grey on my host editor page, whereas Linkedin is colourful, even though all the same.

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

The topic ‘If function exists not bringing it up’ is closed to new replies.