Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
looking for a solution to manage global custom fields
#6
@shawn, thanks , You'd think I'd know my own plugins ...

@yojoe, you can use my other plugin GS_Shortcodes plugin.
Create a file shortcodes.php in your theme folder and add the following code

Code:
function getSetting($atts){
  extract(shortcode_atts(array(
    "name" => ''
  ), $atts));  
// change this line to your table and record number.
  $records=DM_getRecord('settings', '0');
  return $records[$name];
}
add_shortcode('setting','getSetting', '[setting name=""  /]');

you can then use the shortcode

Code:
[setting name="" /]


When editing pages.

WHen setting up a settings table I usually set it to a max records of 1.
Add all the fields and then just edit that 1 record.
My Github Repos: Github
Website: DigiMute
Reply


Messages In This Thread
RE: looking for a solution to manage global custom fields - by n00dles101 - 2013-02-07, 20:04:29



Users browsing this thread: 1 Guest(s)