Just like in WordPress you have the option of creating, editing, displaying and editing pages
I know I can use WP, but for learning I would like to do programming.
I'm trying to develop a function in my panel that should have the option to create page, when clicking this option it brings me the input type=text
field to put the title of the page, the editor (tinyMCE or CKEditor), like of image:
Forexample:inthisareaofWPyouhavetheoptionofeditinganddeleting
These prints are from Wordpress.
In the backend, how do you do this encoding: I know that this information when passed is sent to the bank when it is generated. I also have the option to create a menu, everything is linked.
Front-end, when the client accesses the site there is the menu and when clicked on the menu appears the content that is rescued from the bank.
In this process, I know how to make the administration page to save, edit and delete, make the menus and link them to the bank.
The problem is just on the other side. How do I display these files and menus in the template for the user? Example:
index.php?page=home
, index.php?page=empresa
, and index.php?page=sobre
index.php?page=contato?
(these pages exist).
Let's assume that my client has the site as above (he does not know how to program a line of code) and he wants to create a page on the site, for example, so that it looks like this: index.php?page=galeria
, hence he goes in administration and create, to then appear the page and the respective menu that he created.
I need to do a loop function that, "I think", is checking in the direct bank for whenever it has a new menu in the menu table (for example) it makes the display in nav
of the site, with a conditional to only display if this menu has a content and this reference to some content (it would be the page content) that it will print on the screen for the user.
That's what Wordpress does, right? How do you do this encoding? I have the logic just do not know how to use it.
I'm confused on how to display this content (from the new page of the example I gave above) formatted on the screen for the user as well as the other pages I already had on the site.