Giter VIP home page Giter VIP logo

mpwp-settings's Introduction

MPWP SETTINGS WORDPRESS PLUGIN

This plugin was created to add generic settings pages to wordpress sites, to reduce repetition.

How it works

This plugin installs Advanced Custom Fields when running composer install, in order to create options pages for any wordpress site this plugin is activated on. This makes starting out new wordpress sites a lot easier, and you don't have to create any standard wordpress options pages.

Current Options

These are the current option pages set up currently.

  • Theme settings
    • General
    • Social media
    • Footer settings
    • Slides

Current Shortcodes

There are shortcodes available via this plugin that can be used in the theme.

  • General
    • [mpwp-setting setting="example"]
    • [logo]
    • [phone-number]
    • [email-address]
  • Social media
    • [social-url product="example"]
  • Footer settings
    • [copyright-text]

Adding new options

To create a new options page, there's a few lines of code needed.

  • Create a new options file in options for the new page
  • Refer to this guide for setting up a new option page, or look at an existing one in the plugin
Creating option fields
  • To create the fields for the options page, log into the wordpress site you're currently developing.
  • Install ACF if it's not already installed.
  • Create the fields you want to add to the options page.
  • Export the fields as PHP in the export menu, within ACF.
  • Paste the code it gives you into the options file you created.
  • Look for location in the code you pasted in.
  • Replace location with the following:
'location' => array (
	array (
      array (
        'param' => 'options_page',
        'operator' => '==',
        'value' => 'acf-options-[OPTIONSPAGE]',
      ),
    ),
),
  • Replace OPTIONSPAGE with the name of the options page.
  • If any issues, refer to current options pages for reference.

mpwp-settings's People

Contributors

mattpatterson94 avatar zchlm avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.