Skip to content

Admin Dashboard 0.3

EkoJr edited this page Mar 17, 2017 · 5 revisions

Currently, majority of APL’s Admin Settings are located in the Admin dashboard under Settings -> Advanced Post List. Only Admins have the permissions to create Preset Post List, but once a Preset is created it can be added by anyone to display static or dynamic Post Lists.

Creating Post Lists (Post List Editor)

Content Sorting & Filtering

  • Post Types - Each post type is divided with a collapsible jQuery Accordion and contains Post and Page Types (Generally referred to as Post Types). Any additional Post Types, Custom Post Types (CPT), are dynamically added in the manner in which WordPress does.

    Note: The layout is divided into Post Types in an Accordion design in this manner to follow a general concept with WordPress Posts and Pages. Each Post/Page can have only one Post Type; APL strictly follows this concept.

    • Post Types - Choose what kind of content to Display. Including Custom Post Types (CPT)

      • Posts - Current public WordPress Posts which display in a Non-Hierarchical format.

      • Pages - Current public WordPress Pages which display in a Hierarchical format.

      • Attachments - Media attachments that are used to display images. - Unsupported

      • None - Strips most of the controls and allows the ability to create templates for pages/posts. – Unsupported/Undecided.

      • All - combination of pages, posts, and attachments.

      • Other (Plugins) – Many plugins may use CPT formats to save various types of data - Unsupported/Undecided.

    • Post Type

      • Categories & Tags – Filter content by any, included, required, or all terms within the post type. (May be supported with Page Types via CPTs as well)

        • Require Taxonomy within Post Type- If checked, pages/posts are required to have this taxonomy.

        • Require Terms Selected- If checked, pages/posts must have the terms selected within the taxonomy.

        • Include Terms from Current Page - If checked, terms selected from the current post being viewed will be dynamically added to the Preset Post List.

        • Any/All & (Selected) Terms - When selected with a Post Type/CPT, then Any or All terms can be included in the CPT

    • Page Type

      • Select Parent Page - If the CPT is Hierarchical, Pages, then the option will be available for the Admin(s).

        • Parent Page – When Parent Page(s) are selected, Children Pages of that page will be displayed. Also allows multiple Parent Pages to be selected, but only displays Children Pages.

        • Current Page – Dynamic setting to display Children Pages of a Current Page being viewed.

  • Posts Status Filter - Holds the settings to determine which posts to display based on the user visibility/permissions. Each state requires the users to have the necessary capabilities to view them.

    • Visibility - Display posts as Public, Private, or Both.

    • Status States - Choose from Published, Future, Pending Review, Draft, Auto-save, Inherit, and/or Trash.

  • List Amount - The numeric value of how many posts to display within the Preset. Negative One (-1) will display all the posts that are available after filtering. Zero (0) will display nothing within List Content. And any Positive Number (+X) will display X amount set by Admin.

  • Author Filter - Show or remove posts that were created by a certain author, or Authors. Can only select between Adding or Removing Authors; not both. (Currently restricted by WP_Query)

    • Operator - Determines whether to include or exclude Authors.

    • Author Names/IDs - Displays Authors the site currently has content from, and is Divided/Grouped in the drop down menu for better Admin navigation.

  • Sort - Choose which page properties to sort from. All of which are built in params used in WP_Query.

    • Order By - Sort by a unique page property, and brings most of the WordPress Sorting Functions (Modified Date, Title, ID, Author ID, Parent ID, Menu Order, Random, & Comments Count).

    • Order - Ascending (A to Z, 1 to 9) or Descending (Z – A, 9 – 1) order.

  • Perm - Uses the user permission via. User capabilities to determine what posts to display in the Post List when being viewed by the visitor/user.

  • Ignore Sticky Posts - Meant for the built-in post type (Posts) function. When checked, this will prevent sticky posts from always displaying at the top of the Post List.

  • Exclude Current Post - When checked, the current post being viewed will be excluded from the Post List.

  • Exclude Posts by ID - Add Post/Page IDs, separated by a comma (,), will prevent those posts from being added to the Post List.

  • Exclude Duplicates from Current Post - In the 'order that it is received', for each Preset Post List being loaded on a line-by-line basis, each Post (IDs) that is displayed will be combined into to a Global Exclude List. This prevents the current Post/Page being viewed from displaying duplicate posts from other Preset Post Lists already being displayed.

Design

  • Exit Message - This container stores the HTML & CSS content to display when no posts are queried in the Preset. If no Preset Exit Message is found, an if the Enable Default Exit Message is enabled in the Plugin's Admin General Settings, then the Post List will display the Default Exit Message.

    Note: If you are utilizing the Default Exit Message, but you don't want to display anything in a Preset Post List. Then simple create an Empty Element to display in the Post List (ex. an empty 'span' HTML element).

  • Before List - Used to store any HTML & CSS code that exists before the post/content listings. Useful for initializing div, ul, ol, tables, etc., and also useful for storing CSS styling for Element IDs and Classes.

  • List Content – Design & Style how individual posts will display in the Post List. There’s a multitude of supported formats within this section like HTML, CSS, PHP (requires the PHP function shortcode), as well as the Plugin’s Internal Shortcodes.

    • Internal Shortcodes - Used for inserting Post/Page data for each individual Post being displayed in the Post List. Some shortcodes allow params for returning/inserting various data formats. List of Shortcodes

      Note: If you are using these shortcodes outside of the List Content, then errors will be produced as a result.

      • PHP Function – How to inject PHP code.
  • After List - Used for ending any elements that are still open from Before List, and/or displaying a final message to users/visitors, and/or a link to display ‘More’ using the built-in WordPress permalink structure (aka: Pretty/Nice URLs).

Saving/Storing Presets

  • Preset Name - Set a Unique Name the Preset will be saved as.

  • Save Preset – When button is clicked, the Preset design and configuration is saved to the Plugin’s database, and may check and/or confirm to overwrite a Preset.

  • Show Preview - If checked, a preview will display. Currently between the Save Preset and Preset Database List.

Preview

This intended to better view edits in one area thus preventing the need to switch between Front-End and Back-End.

Note: This may not always result as intended when being Previewed on the Admin Page, especially when using Dynamic settings or Private Posts/Pages. Since the Query uses the Current Page being viewed. A common practice to get an accurate preview is to create a Test Page/Post to Preview the final result of the Preset Post List.

  • Preview - Optionally displays the Preset created (in the Admin APL Settings Page environment). Otherwise remains hidden from view if desired.

Preset Database

  • Preset List Table - Contains all the Preset Post List Data saved within the Plugin’s Database.

    • ID# - Unique value automatically given.

    • Preset Name - Unique Name set by the Admin.

    • Load - Loads the Preset data to the Post List Editor.

    • Download - Download individual Presets to Back-Up/Import.

    • Delete - Permanently remove a Preset from the APL Preset Database.

    • Shortcode – Example of the Preset Shortcode that will be used within the Site to display a saved Preset Post List. How to Display Preset Post List Shortcodes.

  • PHP Code – Example of the (Hard) PHP Code that will be used within PHP files or PHP code format to display the Preset Post List anywhere within the Site. Just copy and paste within the theme files as needed.

Default Presets

Displaying Preset Post Lists

Shortcode

  1. In the Dashboard. Go to Settings->Advanced Post Lists.
  2. Locate & Copy the Shortcode in the Preset Database Table. Look for the row the Preset Name is in, and under Shortcode column there should be the shortcode example.
    • Example [post_list name="PRESET_NAME"].
  3. Go to the Page/Post Editor. In the Dashboard, go to Pages/Post Tab->All Pages/Posts, and under the Title of the Page/Post click edit.
  4. Paste the Shortcode in the Content Editor.Choose either the Visual or Text Tab, and in the Content Editor paste the Shortcode in the location to display a Post List.

Widget

  1. In the Dashboard. Go to Appearance->Widgets Tab.
  2. Under Available Widgets. Click/Drag 'Advanced Post Lists' to Sidebar.
  3. (Optional) Create a Title to add above the Post List.
  4. Under 'Preset Name' label. Select the Preset to display in the drop down menu.
  5. Click Save.

PHP Hardcode (Advanced Users)##

  1. In the Dashboard. Go to Settings->Advanced Post Lists.
  2. Load the Preset Post List into the Editor.
  3. Locate and Copy the Hardcode under the Preset Database Table (which is only displayed when the Preset is Loaded into the Preset Editor).
    • Example <?php if (method_exists($advanced_post_list, "APL_display")){echo $advanced_post_list->APL_display("PRESET_NAME");} ?>
  4. Paste the Hardcode.
    1. WP Editor.
      1. In the Dashboard. Go to Appearance->Editor.
      2. Select the Template to inject the Post List on.
      3. Paste the Hardcode.
    2. 3rd Party Software.

General Options

Settings

  • Settings - General Core Plugin Settings & Actions used within the plugin.

    • Delete database upon deactivation – (Default) If No is selected, the Plugin’s Database will remain stored until the plugin is Uninstalled. If Yes is selected and APL is deactivated/disabled, the Plugin will delete all saved data from WordPress WP_Options Database.

    • Admin jQuery UI Theme - Select from multiple jQuery UI theme styles. Works only with Plugin’s Admin Page.

    • Enable Default Exit/Empty Message - If yes, the plugin will use the Global Exit/Empty Message if the Preset Exit/Empty Message is empty. Used to display a message if no posts are found.

      Note: If you want to use a Global Empty Message for all/majority of your Preset Post Lists, but also prefer to leave some Preset Empty Message hidden. You can create an empty element in the Preset Exit/Empty Message.

      • (Global) Default Exit Message - If enabled, the plugin will use this to display if no posts/pages are queried.

Import/Export Database (Back-up)

Note: This supports Backwards Compatibility, data from older version of APL to recent versions, but doesn’t support newer versions of data imported into older versions (aka Forward Compatibility).

  • Export Data - Creates a JSON (JavaScript Object Notation) file to download the Admin’s Plugin Preset Database. You can also export/import individual Presets, uniform to exporting/importing the Preset Database.

    • Filename – Set the file name which will be used for the Download File. Illegal Characters (< > : " / \ | , ? *) cannot be used in the filename. By default, a timestamp is initially created for the name.
  • Import Data - Load an exported database file from a local source. All older versions of data, including Kalin's Post List (KPL), will automatically be updated to match the current APL file version.

    Note: Newer versions of data files cannot be downgraded to older versions.

    • Upload - load a file from the computer to the plugin database. You can upload 1 or more APL .json files at once.

      • Computer File Directory - locate the target JSON file to upload from your computer. Any other file extension is restricted from being uploaded.

Kalin’s Post List

  • Kalin’s Post List (KPL) Database - Transfer/Migrate data from KPL, the original plugin, into APL's preset database.

Restore Preset Post List Samples

  • Restore Preset Defaults - Restore the original presets that may have been deleted and/or modified. Clicking this won't delete your database, but will restore the initial plugin presets to their initial configuration.

Misc/Other

Info Dialogs

Clone this wiki locally