Create own Wordpress Front End on specific Page - wordpress

i'm writing my first Plugin for Wordpress. A booking calendar. The Admin and Setting Page is already working. The Admin has the possibility to create, edit and delete bookings. I'm struggling with the Front End.
How do i call my "Create a Booking" Form for the User?
Do i need do create a separate Page for that or is it possible for the Admin to call my "Create a Booking" Form in every Page?

There are many ways... The simplest would be to put your form directly into the content of a page or post. In that case, anyone could access the form. If you need to dynamically determine how the form is displayed, you'll want to put it into a shortcode, or use a Wordress page-template in your theme [confusing, because this is totally different from a page!]. Use shortcodes to port your project to any theme, use page templates to lock your functionality into one specific theme. To alter every page, you would put your functionality in a plugin, or in your theme's functions.php file.
https://codex.wordpress.org/Shortcode_API
https://developer.wordpress.org/themes/template-files-section/page-template-files/page-templates/

Related

Should I create custom page template or use functions.php?

I'm using the Genesis framework for WordPress and the Business Pro theme.
I want to customise the contact page and if you view the URL below, you can see the Email and Telephone sections that I want to create next to the form.
My question is should I create custom page template or use functions.php to target the contact page using a conditional. I guess I'm trying to find out best practise or if one method is better than the other in this case.
It does not matter how you create a contact form and add it to the page.
You can use a contact form in a page template. It is easier to manage than managing one function in functions.php file having a lot of functions in it.
Another option - is if you use "Genesis framework", use it further.
Otherwise, the part of the site with the framework and other through the code via ftp...
Make a page with this framework, there create what you need.
It will be easier to maintaining a site in the future. Especially if you make a website for a client who is unfamiliar with development.
You could use the Genesis Simple sidebars plugin to create a custom sidebar which only displays on the contact page and populate that widget area with your email and telephone details.
No need for a template but if you want to, create a file named contact.php in your child theme folder and add the following code to the file :
<?php
// Template Name: Contact
genesis();
You can then select the Template named Contact from the Page Attributes box on the Edit Page screen,

How to customize Wordpress edit post page

I want to add some extra form fields to an existing page in Wordpress.
This page is where you are redirected whenever you edit a post or page.
My problem is I don't know where to find this file or what its called.
I need to know what file i need to edit in order to be able to add the new inputs.
this page would only be seen if you are an administrator and logged in and in dashboard.
I'm using wordpress edge shuffle theme.
The easiest way to solve this is to use Advanced Custom Fields. ACF allows you to specify custom fields that appear on certain edit pages in the admin. You'll then have custom data to use on your frontend templates.
Check out this tutorial for more.
For me, as I was just trying to figure out how to edit my posts page
While logged on to my admin account to edit, I went to my actual page and the top admin bar had an option of "customize" and that took me where I needed to go to add some css

Replacing ACF with my own code while building WP template

Is it possible, in your opinion, to code my own code so I could:
1. upload images in the WP backend interface.
2. attach that images to a specific post types ?
Also, I would like to replace repeater fields in option page with my own code.
It is possible to replace ACF option page with a simple WP function, that will create a new admin menu page. Thus, there is no need to ask the end user to purchase ACF pro in order to install my new WP theme. In the new admin menu page, it's possible to build a HTML Bootstrap posting Form. that WP function is called : add_menu_page().

Wordpress custom template changes not working/showing up

I have a WordPress site using a custom made theme by some other developer. That theme uses several custom made templates. Each templates exposes some fields in the front page editor (Pages->Add New, Template).
Now I want to change some existing template, I edit the template file and updated/saved that. When I preview that page, I can see the changes but when I open that page in (front end) editor mode, I cannot see any changes.
For trial I deleted everything from that template and create a new page with that template selected and to my surprise I can see all the fields in the front end editor that were there before I deleted the template code.
To summarize, a custom template file had some field before, later on I deleted all the code but in front end editor I can still see those custom fields.
I tried some caching plugins and tried to clear cache but no help.
I am out of ideas that what this could cause this.
I cannot share code as my company do not allow that. So any clue/ideas will be helpful.
Thanks in advance...

How to create dynamic page in wordpress and hide from menu

I have a wordpress plugin and i want to create a dynamic page when the user activates the plugin. Page creation is already done. But i want to hide it from the pages menu. No matter how wordpress is configured i want to hide the page.
Page can be only accessed using the url.
Can anyone provide me a solution for this.
You can do it by assign a different value to post_type like dy_page
for more info see: Post_type and How to use Custom Post Types in WordPress 3.0

Resources