Developers

  1. Modify Css / Styles / Layout
    1. Frontend Css
    2. Admin Css
  2. Templates
    1. Pages
      1. page.order.php
      2. page.confirm-order.php
      3. page.processing.php
      4. page.thankyou.php
      5. page.cancelled.php
      6. page.purchase-history.php
    2. Order
      1. itemised.php
      2. summary.php
      3. transaction_details.php
    3. Global
      1. orderinfo.php (Widget)
      2. openingtimes.php (Widget)
      3. additives.php (Widget)
      4. navigation.list.php (Widget)
      5. navigation.dropdown.php (Widget)
      6. search.php (Widget)
      7. totals.php (Widget)
      8. pickup_choice.php (Mixed)
      9. login.php (Module)
      10. profile.register.php (Module)
      11. profile.update.php (Module)
      12. pages.pickup_note.php (Module)
      13. formfields.inputs.php (Module)
      14. formfields.values.php (Module)
    4. Cart
      1. cart.container.php
      2. cart.shopclosed.php
      3. cart.empty.php
      4. cart.pickup_note.php
      5. cart.checkout_button.php
      6. cart.empty_cart_button.php
      7. cart.minimum_order.php
      8. minicart.php
    5. Loop (Menu Items)
      1. header.php
      2. no_results.php
      3. posts.title.php
      4. posts.thumbnail.php
      5. posts.prices.php
      6. posts.content.php
      7. posts.permalink.php
      8. additives.php
      9. pagination.php
      10. theme-wrapper.php
    6. Search Results
      1. search.php
    7. Single Menu Item
      1. single.php
    8. functions.php
  3. Filters, Actions, Functions
    1. Global WPPizza functions
    2. WPPizza options (Filter)
    3. Currency (Filter)
    4. After every order (Action)
  4. Constants
    1. Admin Name
    2. Admin Menu Icon
    3. SORT_ITEMS_AS_ADDED
    4. SINGLE_PERMALINK_VAR
    5. WIDGET_CSS_CLASS
    6. PLAINTEXT_LINE_LENGTH
    7. ADMIN_{CONSTANTS}
    8. DEV_{CONSTANTS}
    9. INSTALL_{CONSTANTS}
    10. TRANSACTION_{CONSTANTS}
  5. Codesnippets
    1. Create your own sales report
    2. Order history - todays orders
    3. On order status update
    4. Customise order id
    5. Changing post type arguments
    6. Gateway filter frontend
    7. Users previous orders
    8. Dynamic menu item prices
    9. Prices output loop
    10. Additional validation function

2.Modify Templates - Readme

Note: for modifying styles, colours, layout etc (i.e css declarations) please see the appropriate “Modify/Edit Styles/Layout” section in the documentation

Generally, WPPizza layout – i.e html – elements can be modified by using filter hooks provided or – in the case of the loop/menu items – by simply using shortcode attributes to re-order elements as necessary (see shortcode documentation for details).

If at all possible, I would advise you to use the provided hooks for any adjustments you might want to make where ever possible as over time additions might be made to those files you will not be able to take advantage of if you are using your own copies without having to re-apply your changes every time the plugin gets updated.

Furthermore, your email and print templates are directly accessible from WPPizza -> Templates using drag and drop and css declarations per template (if using the “html” template type). Note: “Plaintext” templates are not stylable and will only allow setting the sort order of elements.

Using actions/filters – recommended and preferred way

  • For a list of hooks available – with accompanying examples – please refer to the relevant section from the navigation menu.
  • IMPORTANT:
    When you filter things, do NOT remove or replace any existing classes or id’s from elements. The functionality of WPPizza relies on them.
  • If you need to have a need for your own classes, add them instead

Editing files directly – only if filters/actions cannot be used

If, for whatever reason, you feel you must edit templates directly you should do the following so subsequent updates of the plugin do not overwrite any edits you may have made

  • CREATE the following directory structure in your child theme (see notes below): /[abs-path-to-wp-content]/themes/[my-child-theme]/wppizza/markup/.
  • COPY the relevant file from /[abs-path-to-plugins]/wppizza/templates/markup/[choose-directory]/[choose-file.php] to the directory we have created above, keeping the subdirectory structure intact.
  • EXAMPLE: if you wanted to edit the template element that displays the “cart is empty” in your WPPizza shoppingcart, copy /[abs-path-to-plugins]/wppizza/templates/markup/cart/cart.empty.php to /[abs-path-to-wp-content]/themes/[my-child-theme]/wppizza/markup/cart/cart.empty.php and edit as required.
    Please note the change from “templates” in the plugin itself to “wppizza” in your child theme.
  • IMPORTANT:
    When editing make sure to leave the element structure/nesting as well as classnames and id’s intact as many functions rely on it. In *most* cases it is probably ok to – for example – change an “h3” element to a “h4” element, adding additional css classes or perhaps adding another wrapper element. However, if you do any of the above, make sure you test things thoroughly !

Although you could also use your main theme and create the above mentioned directory structure there, using a child theme is by far the better and recommended way to do this – see WordPress Child Themes) as to why.

Editing files directly – Multisite – only if filters/actions cannot be used

First of all, the same recommendations apply to directly editing copies of the template files – i.e use filters/action instead. However, if you do, instead of creating a wppizza directory in your child theme, you could use a directory as child of the wp-content directory instead – especially if you are using different themes for different subsites but want to apply your specific wppizza modifications to all subsites i.e

  • CREATE the following directory structure in the wp-content directory: /[abs-path-to-wp-content/wppizza/markup/.
  • COPY the relevant file from /[abs-path-to-plugins]/wppizza/templates/markup/[choose-directory]/[choose-file.php] to the directory we have created above, keeping the subdirectory structure intact.
  • EXAMPLE: if you wanted to edit the template element that displays the “cart is empty” in your WPPizza shoppingcart, copy /[abs-path-to-plugins]/wppizza/templates/markup/cart/cart.empty.php to /[abs-path-to-wp-content]/wppizza/markup/cart/cart.empty.php and edit as required.
  • IMPORTANT: “wppizza” directories created in [child]-themes will take precedence over directories created as child of wp-content. Only ever one wppizza sub-directory will be read. So if you create a “wppizza” directory in your child theme AND as sub-directory of wp-content only files in the child theme will be read (provided that child theme is active.) Therefore, you could apply filters etc to all your subsites if you add customisations to wp-content/wppizza but entirely overwrite these for a certain [child]theme if you create a wppizza subdirectory there. If you want to have all your customisations you made in wp-content/wppizza applied to your childtheme too, but want to add to it, you must copy everything to your child theme first
  • SUGGESTION: For your own sanity, if you need to apply some global edits as well as some that only apply to a certain subsite, you might want to perhaps consider only using the /[abs-path-to-wp-content]/wppizza/ directory and using conditionals in the files based on blog_id. something like:

    
    global $blog_id;
    if($blog_id == x){
    /* do your thing */
    }
    
Yes No Suggest edit
Suggest Edit

documentor id 5