Wordpress plugin page for front-end users - wordpress

I am new to Wordpress. but I know Joomla very well. I was trying to create a plugin which have front-end and back-end maintenance section. I completed my back-end section and I am on the way to front-end section. But I struck with some doubts. My doubts are, I found two method to implement a front-end page. One is copying the php page to template directory and assign the template in the add page section. another is create short code in plugin and add some tag inside the page section.
My doubt is which one is the correct way to do this in Wordpress?
In Joomla this is done by a component which have different views and controllers very easy to manage!
Please help me.

There's a 3rd, more code way - use filters, hooks, etc. You can actually create your own views and controllers in your plugin's folder, just learn how to use your own code in different page lifecycle stages.
Tom McFarlin's tutorials are great for learning this (proper) way of developing custom functionality with WordPress. Check them here:
http://tutsplus.com/authors/tom-mcfarlin

Related

How does static site generator work with a CMS like wordpress

I have been exploring using Vue for wordpress frontend, and I came across so many different technologies, like Nuxt.js, Gridsome, VuePress, and they help to create sites into SPA, SSR, or static sites. I really like these ideas, because I want to move into modern frontends instead of using the WordPress default. So I am looking into headless WordPress.
After some research, I think I kind of like Gridsome with Wordpress, as Gridsome helps to build static site by compiling content from CMS and templates at build time.
So I have a very newbie question, CMS like wordpress gets updated everyday by users, to update pages, add new posts etc, does that mean you need to build the site every time people add some content to the CMS?
I'm going to build a sort of internal portal, with WordPress and I want to try out Vue, so with all these technologies out there, I am lost at what framework best suit my project with dynamic content.
Any suggestions or insights? Thanks.
So I have a very newbie question, CMS like wordpress gets updated everyday by > users, to update pages, add new posts etc, does that mean you need to build the > site every time people add some content to the CMS?
Yes that's the concept of a statically generated site.
Still it's a choice of how you design your application.
Normally when a new post is created there can be an event / webhook triggering a build job which would automatically build and deploy the page with the latest post.
Still you can have in your deployed application client side Vue components which call the API directly to retrieve data and display it. For example for the comments it could make sense to do this.
Netlify is a good example which has the whole static site generation eased up with a nice CI / CD which can be triggered automatically as soon as your site. They also have a CMS which works on top of markdown files. As soon as a changed / new markdown file is commited to the repository it triggers a build to deploy the latest version of the page.
I hope this helps.
Thanks and best regards,
ewatch

What type of template from WP can be suitable for the site with the game "Quiz"

The task is to create a website with a personal account. On the site will be a game of "Quiz". What template would you recommend to use or better to make a website from scratch? Are there such suitable templates on WordPress or not?
So, It mostly doesn't depend on Theme, rather depends on what you make to the website like using Css and jQuery to make UI enhancements.
Also use the below link for best plugins that help you build your QUIZ game with numerous features.
https://www.wpbeginner.com/showcase/best-quiz-plugins-for-wordpress/

How to convert custom cms to worpdpress plugins

I have my own custom gallery CMS which is built using php & mysql. Now I want to make this as a wordpress plugin for my client, meaning my custom gallery admin panel will be shown in wordpress as a single plugin.
How can convert my script to be a wordpress plugin? I am new to wordpress so I really have no idea about making plugins, so I'm wondering if I can just add a few lines of code and just by making a few changes to my script I can make it all work as a plugin?
Before you go any further, you should really question integrating your own CMS into WordPress. I've done this before, and it ended up having a lot of disadvantages in the long-term, like not benefiting from functionality and security updates from the WordPress team. The newer versions of Wordpress provide a lot of useful functions to generate your own custom admin functionality within WordPress, including Custom Post Types, Custom Taxonomies, Custom Meta Boxes, etc.
As an experienced WordPress developer, if I had a client that demanded more than the built-in gallery functionality that WordPress already provides, I would go one of two routes, depending on the requested functionality:
1. Add functionality to the existing WordPress gallery via hooks and filters
This site is an excellent resource to see just how deeply you can modify WordPress with hooks and filters:
http://adambrown.info/p/wp_hooks
2. Create a custom post type, client uploads images to the post as normal
This method you would just create a new 'gallery' post type, and the client would upload images with all of the built-in WordPress interfaces. You can add any additional functionality you need with functions like 'add_meta_box'... here's all the relevant links, including taxonomies if you need categorization and a good sort-by-taxonomy tutorial:
http://codex.wordpress.org/Post_Types
http://codex.wordpress.org/Function_Reference/add_meta_box
http://codex.wordpress.org/Taxonomies
http://justintadlock.com/archives/2011/06/27/custom-columns-for-custom-post-types
If you're absolutely hellbent on using your existing CMS, you can always load your code into an iframe on a custom WordPress admin page, but I don't recommend it based on experience. Here's a link that will guide you in that direction:
http://codex.wordpress.org/Administration_Menus
Just as a post-script, you can do any or all of these things either via a WordPress plugin or a custom WordPress theme. I tend to prefer adding functionality to a theme if I don't plan on sharing it with the world and documenting it, or if the functionality is very client-specific and not reusable.

How to integrate different templates for my frontend and backend pages of my website

Could anyone please help me with this situation.
I do have a front-end and a back-end for my website.The problem that i encounter here is that i have 2 specific templates ,one for the front-end and other for the back-end.I have integrated my front-end design using the page.tpl.php file.But how am i supposed to integrate my back-end template on to my site.A little help would be very useful.
You can specify a theme for the admin interface. Go to
admin/appearance
At the bottom of the page you should see a drop down menu to select your admin theme.

How to use wordpress to make a commerical/non blog website

I have managed to setup a blog on localhost quickly using wordpress. But what is ivolved in setting up a commercial website that is not a blog?
Also, should learning to use wordpress be more diffcult than learning Asp.Net or php? I can use these languages to create a website more quickly than using wordpress it seems. I'm guessing it should be possible to create a basic php website and then somehow hook it up to the admin functionality of wordpress to publish content and update it?
Any comments and suggestions will be appreciated.
Thanks,
A few thoughts on this.
First, Wordpress is based on PHP. So if you know your way around in PHP you are able to change anything within wordpress, you can build customized plugins, templates, etc.
However, using Wordpress has nothing to do with the programming languages you know. The fact that you are struggling with it is probably more because you don't understand yet what the features of Wordpress are or what you can use them for.
You can easily use Wordpress to create a simple non-blog website by setting up pages instead of posts. So you would be using Wordpress not as a blog engine but more as what's usually called a content management system CMS (not that using it as a blog engine wouldn't make Wordpress a CMS, but I'm talking about the general usage of those wordings).
A simple Google search might help you find more information about how to accomplish it in your specific case.
Hope this helps!
You need experience with PHP, HTML and CSS to configure WordPress to run like a non-blog website. Is it easier? Maybe, you get what you want but you won't understand what is going on.
If you are creating a static web page, say like a company's web site with little to none dynamic content, use pages (not posts) and create a static front page.
If you wish to use WordPress like a generic CMS, you can either use the Pods plugin or the newly introduced custom post types and taxonomies (new in Wordpress 3.0). You still need knowledge of PHP/MySQL to configure the Wordpress Loop (which is used to display blog posts and other dynamic content) and Wordpress Theme tags (to display name of the current logged in user).
Some plugins help with customizing the site for a non-blog look. Theme My Login and Theme my Profile blends the log-in page and profile page with your theme. However, if you need to customize the appearance, or add new logic, you pretty much need programming.
In short, you would need knowledge of PHP and MySQL; CSS too, if possible. Get your hand dirty building some sites, then what Wordpress offer and does for you with its API will be more relevant.

Resources