Advertisement:

Author Topic: Add social pages on site header and footer  (Read 243 times)

ig

  • Jr. Member
  • **
  • Posts: 68
Add social pages on site header and footer
« on: April 21, 2019, 12:29:54 pm »
Please, how can i add my social media pages link on my website header and footer so that users will follow my pages on social medias like facebook, twitter, linkedin, google+, pinterest, instagram and others.

ig

  • Jr. Member
  • **
  • Posts: 68
Re: Add social pages on site header and footer
« Reply #1 on: April 22, 2019, 09:57:24 am »
please who knows the solution to this issue.

Classifieds_

  • Newbie
  • *
  • Posts: 3
Re: Add social pages on site header and footer
« Reply #2 on: April 22, 2019, 05:15:47 pm »
What theme are you using?
If it's bender (might work for other themes too)

Open header.php and add the following

Code: [Select]
<ul id="header-links">
    <li>
        <a href="https://www.facebook.com/" target="_blank"><?php _e("Facebook"'vendorpro'); ?></a>
    </li>
    <li>
        <a href="https://twitter.com/" target="_blank"><?php _e("Twitter"'vendorpro'); ?></a>
    </li>
    <li>
        <a href="https://www.instagram.com/" target="_blank"><?php _e("Instagram"'vendorpro'); ?></a>
    </li>
    <li>
        <a href="https://plus.google.com/" target="_blank"><?php _e("Google Plus"'vendorpro'); ?></a>
    </li>
</ul>

and in footer.php if you want them to show up as links you can add something like this

Code: [Select]
<ul id="footer-links">
    <li>
        <a href="https://www.facebook.com/" target="_blank"><?php _e("Facebook"'vendorpro'); ?></a>
    </li>
    <li>
        <a href="https://twitter.com/" target="_blank"><?php _e("Twitter"'vendorpro'); ?></a>
    </li>
    <li>
        <a href="https://www.instagram.com/" target="_blank"><?php _e("Instagram"'vendorpro'); ?></a>
    </li>
    <li>
        <a href="https://plus.google.com/" target="_blank"><?php _e("Google Plus"'vendorpro'); ?></a>
    </li>
</ul>

dont forget to replace vendorpro with your theme name for example bender

once done you can use css to make the header links on one line while keeping the footer ones as a list

Good luck.

ig

  • Jr. Member
  • **
  • Posts: 68
Re: Add social pages on site header and footer
« Reply #3 on: April 22, 2019, 07:33:09 pm »
First of all, thanks for that information, am grateful.

am using osclasswizards theme.

the code makes it appear below the footer border and is listed. i want only the social logos to show and list in grid within the footer border.

again, which css code can i use to make it appear in grid on header.php.
« Last Edit: April 22, 2019, 08:01:03 pm by ig »

patrickFromCroatia

  • Hero Member
  • *****
  • Posts: 771
Re: Add social pages on site header and footer
« Reply #4 on: April 22, 2019, 10:12:39 pm »
Hello,

For Osclasswizards footer, open footer.php and find

Code: [Select]
        <?php if( osc_users_enabled() || ( !osc_users_enabled() && !osc_reg_user_post() )) { ?>
        <li class="publish"> <a href="<?php echo osc_item_post_url_in_category(); ?>">
          <?php _e("Publish your ad for free"OSCLASSWIZARDS_THEME_FOLDER);?>
          </a> </li>
        <?php ?>

After it add this. You can copy the line multiple times and change URL and text.

Code: [Select]
    <li><a href="Your Facebook URL" target="_blank">e.g. Facebook</a></li>

For Osclasswizards header, open header.php and find

Code: [Select]
       <?php if(osc_user_registration_enabled()) { ?>
        <li><a href="<?php echo osc_register_account_url() ; ?>">
          <?php _e('Register for a free account'OSCLASSWIZARDS_THEME_FOLDER); ?>
          </a></li>
        <?php }; ?>
        <?php ?>
        <?php ?>

After it add this. You can copy the line multiple times and change URL and text.

Code: [Select]
    <li><a href="Your Facebook URL" target="_blank">e.g. Facebook</a></li>

Regards.

Classifieds_

  • Newbie
  • *
  • Posts: 3
Re: Add social pages on site header and footer
« Reply #5 on: April 22, 2019, 10:41:33 pm »
Since osclasswizards uses font awesome - if you want to have icons instead of text you can add this to the place patrickFromcroatia mentionned
Code: [Select]
<li><a href="fb URL" target="_blank"><i class="fab fa-facebook-square"></i></a></li>
<li><a href="twitter URL" target="_blank"><i class="fab fa-twitter-square"></i></a></li>
<li><a href="linkedin URL" target="_blank"><i class="fab fa-linkedin"></i></a></li>
<li><a href="google URL" target="_blank"><i class="fab fa-google-plus-square"></i></a></li>
<li><a href="pintrest URL" target="_blank"><i class="fab fa-pinterest-square"></i></a></li>
<li><a href="instagram URL" target="_blank"><i class="fab fa-instagram"></i></a></li>

ig

  • Jr. Member
  • **
  • Posts: 68
Re: Add social pages on site header and footer
« Reply #6 on: April 24, 2019, 02:37:06 pm »
 :D ;D Thanks to everyone. especially the codes provided by Classifieds, The codes worked fine and i love the way the social icons appear.

Just one more thing, i want to write Follow us before the icons both on header and footer. where can i write it in the code?