Wordpress Plugin - Open Pages Inside Admin Panel - php

I am making a plugin. The plugin has pages that access a database, add, edit and delete records, call stored procedures etc. I have gotten as far as creating the plugin, and adding menus and submenus to the admin panel and having those menu links open in the admin panel. These are pages that handle the adding, deleting and editing of records in the database. Some of these pages have a link that would pass an id for example to another page in order to edit a record.
Those pages that are used in the admin panel of my plugin, that link to other admin pages for my plugin, do not open in the admin panel, they open outside of it. How can I create links in my plugin pages to stay inside of the admin panel of wordpress?
To clarify, I am able to add menu items that load pages in the admin panel. Maybe this screen shot will explain. So how can I open pages inside the admin panel?

In order to display your plugin's administrative UI within the framework of the WordPress dashboard you need to follow quite a few WordPress conventions.
The first is to write code for each administrative panel in a separate function. Each of these functions (one per admin panel in your plugin) must display the panel's HTML elements in a <div> object, allowing WordPress itself to wrap your divs in the dashboard display.
The next is to write a menu-building function for your plugin's dashboard menus, and then register that function with the admin_menu action hook. This menu-building function will contain references to your functions to display administrative panels.
Here is a writeup on the topic. http://codex.wordpress.org/Administration_Menus

Related

Custom WordPress Plugin - Create A FE Page

I am trying to create a custom plugin that adds a frontend page to the site. I have figured out how to have WordPress create the pages to the DB when the plugin is activated, but that gives the user the ability to delete them so I would like to create them sort of like adding a static page in the theme, but within a plugin.
I have found this article that shows how to use parameters to display a page, but I would rather have it be a specific slug, not a parameter: https://opensynergic.com/make-custom-plugin-front-end-page-in-wordpress/
Any assistance or direction would be amazing!
Thanks!

Customizing wordpress navigation header with woocommerce my account

I am new to wordpress and I was creating a eCommerce website with woocommerce, then I have an idea to make an custom navigation header where when user is not log in it will show login/register and when login it will show to name of the customer.
There are a few ways you can achieve this.
The easiest option is to use any one of the below plugins. Using these plugins, you can show/hide menu items based on their login status. These plugins also allow you to customize the menu based on User roles as well.
https://wordpress.org/plugins/nav-menu-roles/
https://wordpress.org/plugins/user-menus/
Or you can assign a custom class to the menu item and then you can hide/show them using CSS. "logged-in" class is added to the BODY tag when a user is logged in.

How can I get list/array with menus from the admin panel in Wordpress?

I tried to get list of menus (left sidebar: Posts, Media, Pages...) in admin panel without success.
I want to take all the menus or only the custom (additional) menus in the admin panel.
I made couple of tests with global $menu, $GLOBALS['menu'], get_registered_nav_menus()... but no have any information in.
Any idea?

Editing template content from the dashboard screen in Wordpress

I would like to set up a way to be able to edit content in my template form the wordpress dashboard or new admin page.
Something like creating input boxes on the dashboard, or on a new admin page, that would update specific content I have hard coded in my template.
I'm using a one page site (long scrolling), and would like to allow people to edit the separate content areas from an admin page.
(an existing plugin that does this would be fine too)
Thanks!

Social Engine How to add or edit menu items

I am new to Social Engine. I am trying to add a custom menu item that will work with jQuery.
But I need to understand where is the file or files to edit in order to apply these changes.
Can anyone tell me how the Social Engine core is organized?
How do I find the files that control and generate the menu items?
Go to Control panel > Layouts > Menu editor and add new menu items to existing menus. From the same page you can also create new menus and later add them to any layout using the layout manager.
You should be able to add jQuery functionality to any menu by editing a suitable view file. Like if you want your jQuery to be available site wide then you can edit application\modules\Core\layouts\scripts\default.tpl and other layout scripts on that folder.
You can also create menu plugins. Take a look at this table on database- engine4_core_menuitems. You can see some menu items have corresponding classes. Find out those classes in SocialEngine and try to understand how they work. You can add conditions, small javascripts using these classes and this is recommended way to work with SocialEngine menus.
go to admin(control panel)
Layput
Menu Editior
As mentioned previously, we recommend editing menus in the Menu Editor which can be found in the Admin Panel > Layout > Menu Editor. For detailed instructions, please see: http://support.socialengine.com/questions/217/Admin-Panel-Layout-Menu-Editor
You can view the below mentioned video URL to understand the working environment with Socialengine Menu through admin user :
https://www.youtube.com/watch?v=Frc5U6iB_wg
need to click on Control panel then Layouts then Menu editor and add new menu items to existing menus. From the same page you can also create new menus and later add them to any layout using the layout manager.

Categories