Overriding templates via theme

“Overriding templates via theme” Documentation by “WPWeb”

Template Structure + Overriding templates via theme

The template files of Easy Digital Downloads Social Login contain the markup and template structure for the front-end of your site. If you open these files you'll notice they all contain many hooks which will allow you to add/move content without having to edit the template files themselves. This method protects even further against any upgrade issues as the template files can be left completely untouched.

Alternatively, you can edit these files in an upgrade safe way through overrides. Simply copy it into a directory within your theme named /edd-social-login, keeping the same file structure.

Example : To override the EDD Social Login button design for guest users, copy : edd-social-login/includes/templates/social-buttons/facebook.php to yourtheme/edd-social-login/social-buttons/facebook.php

The copied file will now override the Easy Digital Downloads EDD Social Login default template file. Do not edit these files within the core plugin itself as they are overwritten during the upgrade process and any customizations will be lost.

The following template files can be found within the /edd-social-login/includes/templates/ directory:

Templates
  • checkout-social-wrapper.php
  • social-buttons.php
  • social-profile-list.php
  • social-buttons/
    • amazon.php
    • facebook.php
    • foursquare.php
    • googleplus.php
    • instagram.php
    • linkedin.php
    • paypal.php
    • twitter.php
    • vk.php
    • windowslive.php
    • yahoo.php
  • social-link-buttons/
    • amazon_link.php
    • facebook_link.php
    • foursquare_link.php
    • googleplus_link.php
    • instagram_link.php
    • linkedin_link.php
    • paypal_link.php
    • twitter_link.php
    • vk_link.php
    • windowslive_link.php
    • yahoo_link.php

These files contain the markup and template structure for the front-end (and HTML emails) of your store. If you want to edit one of these templates simply copy it into a directory within theme named /woo-social-login, keeping the same file structure, e.g. move "/templates/social-buttons/facebook.php" to "yourtheme/woo-social-login/social-buttons/facebook.php". The copied file will now override the EDD Social Login default template file. Do not edit these files within the core plugin itself as they are overwritten during the upgrade process and any customisations will be lost.