0

I am trying to show pods ui on front end which it now has been updated to do so however my porblem is its still using the old admin css from wordpress. So my questions is how do i load admin styles in a page template like the following. Its missing the styles like wide fat etc

<?php
/**
* Template Name: Goals Managment
*
* @package WordPress
* @subpackage Twenty_Fourteen
* @since Twenty Fourteen 1.0
*/

get_header();

$object = pods( 'goals' );
$add_fields = $edit_fields = array(
    'title',
    'points',
    'foundation_payout',
    'kids_payout',
    'total_payout',                 
);

$object->ui = array(
    'title'   => 'goals',
    'columns' => array(
        'title'   => 'Title',
        'points'  => 'Points',
        'foundation_payout'  => 'Foundation Payout',
        'total_payout'       => 'Total Payout'
    ),
    'add_fields'  => $add_fields,
    'edit_fields' => $edit_fields
);
pods_ui_manage($object);
get_footer();
?>
Berriel
  • 12,659
  • 4
  • 43
  • 67
c-sharp-and-swiftui-devni
  • 3,743
  • 4
  • 39
  • 100

1 Answers1

0

You are running the wp_head and wp_footer actions (they are inside get_header/footer() ) but not their admin siblings admin_header and admin_footer.

Try adding do_action( 'admin_header' ); to the header and do_action( 'admin_footer' ); to the footer. Also, you should wrap this whole thing in a permissions check and redirect to login or home if it fails.

JPollock
  • 3,218
  • 4
  • 26
  • 36
  • Thanks budy ill try that after is thier a basic style sheet though if i want to customize the forms appearance obv i dont want to be eidting admn css as would change the wrodpres dashboard – c-sharp-and-swiftui-devni Oct 18 '15 at 12:08
  • also i notticed the save button is to the right i dont no why as when i go to edit their is no back button to oallow them go back to the list i no pods ui was ment for back end but im trying to give the managment team a front end login system – c-sharp-and-swiftui-devni Oct 18 '15 at 12:09
  • Honestly I think this is a bad solution to your problem, which I think is to create a front-end management form. Why not use the form method of the Pods class? http://pods.io/docs/code/pods/form/ – JPollock Oct 18 '15 at 20:44
  • I changing to use gravity forms but i cant get relationship list to work and save properly see this form http://fundrasing.davidbuckleyni.co.uk/register-palyer/ see where i add parent information i want to add 2 people and save it also how do i make the pods to save on their own table or do they do that automtircally – c-sharp-and-swiftui-devni Oct 19 '15 at 09:10
  • Can you please use Pods.io/forums for Pods support? SO is good for general questions, if you have a specific use case question or a bug report, please use Pods support. – JPollock Oct 20 '15 at 17:26