Show plugin entries in frontend without using shortcodes - wordpress

I just wrote a plugin that creates a database, populates and edits rows from the backend, now what I need to show a list view of those rows with teir respective link to a detail viewo of each one. The shortcode approach, I have already done it, but that does not get the purpose of my plugin, as I want it to be available in the Menus configuration, just like Woocommerce endpoints are. How can I do that? Has someone here done something alike?
Edit, I just realized that woocommerce just creates pages with the correspondent shortcode embedded in them. This just makes that more difficult.

Related

Wordpress: How to create frontend table using data from backend DB table

I am relatively new to WP, and am trying to figure out if the following can be done, or if a plugin exists?
I am looking to save data (500K+ rows) into a SQL table (maybe a new table in WP database), and then render the results on a page (frontend) using some basic JS and CSS. Because of the size of data, I am not sure if I should use a plugin that imports from CSV/JSON and would it slow down the site.
Do I have to go all the way and create models and views and then render to an HTML, or is there an easy hack available?
As the last resort, I am also thinking of creating the table part using Flask and SQlite and use it as main domain, and WP blog as subdomain (don't know if it will impact SEO).
Request guidance from experts. TIA
There are plugins to handle table work. Use your favorite internet search engine to find them. You'll have to experiment with various plugins to get one that meets your needs if you go that route.
There two questions here.
One is how to render a table on the front end. If you do this yourself , your best bet is to create a plugin that defines a shortcode. When you write php code for that shortcode's handler, you will include code to read and render the table. You'll probably render it as an ordinary html <table>.
Then, you'll use WordPress's content editor to create a post, or a page, that contains your shortcode. When a visitor views the post or page, your shortcode handler runs and delivers the table you want.
The WordPress plugin API also gives you a way to enqueue css and Javascript to your pages. And, jquery is an inherent part of WordPress's page loads. WordPress also contains most of jqueryUI. That's handy, because there's a really nice jquery-based plugin called Datatables that will get your users some convenient features like pagination and sorting.
The second question is how to load that data into a table. The easy way would be to do it outside WordPress, with a SQL file or some other program to bulk-load it. But if you do it inside WordPress, you'll do it from an administrative page.
If you need to be able to add, update, or delete table entries from the front end, that's going to be some work.
Explaining all this in detail is far outside the scope of a Stack Overflow answer.

Divide checkout field in woocomemrce

I need to totally customise WooCommerce checkout page. I can do a lot of things with Woocommerce programatically but this one is not an easy task since I need to divide these fields just like on the picture below.
Website is on this link: https://2houragency.com/. I can see that they have hidden some default Woocommerce HTML elements and created their own, but I am not sure how to do it by myself. And Wocommerce is not that easy to customise for this kind of pages.
Get into the templating documentation of WooCommerce here.
You'll probably want to use one of these template files to re-order/structure the checkout template.
You can find even more information in the Code Refference.

wordpress website- implement search sort and filter

i am using avada fusion theme in my wordpress site, different plugins work fine if i need to search posts and pages, but i need to search/sort/filter in a page where i have created 100+ containers/items as a list(like slides or templates).
how can i get it done?
And also what would be a good approach if my list is going to be long i.e 400+ in near future?
re: i have different graphical and text included items in a page with same templates, and i need to search, sort, filter from that list in that page.
I do not see any option to tag or id each template/containers in page which would make search/sort easy.
thank you in advance

How To Add Custom Field In woo commerce product listing admin page in Wordpress

I am very much new to wordpress and need help. Well I need to add a custom field to woocommerce product listing page in admin and make it work.
So where do I have to make changes in code or in admin section.I need some suggestions on how to make it work.
Thanks in advance
if I'm understanding you right you want to add new fields to your woocommerce products, and you want those fields to show up in the admin panel. I am working on this right now myself and I have found a few good resources.
First of all, although I can't find any documentation on them yet directly in the woocommerce API docs, there are two hooks for extending the admin panel.
woocommerce_product_write_panel_tabs - this allows you to insert a new tab within the admin panel. from browsing the source of various free woocommerce plugins that do this it appears that the tab format should be <li>Tab Name</li>.
woocommerce_product_write_panel - this is where the insertion of your custom panel contents would go, placed within a <div id="#tab_name"></div>
These are the two hooks that I have had a great deal of difficulty locating. They allow you to hook into the actual woocommerce admin area, otherwise custom fields you might add will end up in a separate panel.
For all the details on actually adding the custom fields themselves and hooking them up to the front-end, I suggest this tutorial here, which covers the basic concepts involved in adding a new meta-data field and hooking it into the product display (in this case the single-product detail view, it sounds like you want to modify them in the list view but this will show you the basic principles).
http://www.xatik.com/2013/02/06/add-custom-form-woocommerce-product/
Note: that tutorial doesn't use the woocommerce admin panel but creates its own panel, the instructions I gave above, plus this tutorial, should get you just about anywhere you need to go.

WordPress Plugin Development Idea? Is this possible? Am I on the right track?

I'm very new to WP development. I host a website which needs a list of trails (hiking, biking, etc) and I'd like to write a WordPress plugin to do it.
Can someone please tell me if I'm taking the right approach, and if what I'm proposing is possible.
I'd like the site to end up with an auto-generated and filtered index at http://example.com/trail-guide, and the discrete trail info pages at http://example.com/trail-guide/trailname. This data would all be stored in a single database table holding info for each trail, with an admin page for adding, editing, and deleting entries from here.
Is a WP plugin the best way to go about doing this, or should I be looking at something else?
From the way you're describing, your best bet would be to Register A Custom Post Type. This can be done by adding to your existing theme's Functions.php file, or by creating a plugin.
If you don't plan on changing themes, my advice would be to just hardcode everything into your functions.php file. Otherwise, creating a plugin for this particular job would be the safest alternative.
Using this functionality in tandem with Custom Meta Boxes and Custom Taxonomies will allow you to keep everything organized within the Wordpress Framework with your own special data.
This means that these new posts can also be queried at any time through the standard Wordpress Loop or search box.
If you are uncomfortable with writing your own functions to extend your existing framework, you might want to look into some plugins like GD Custom Posts And Taxonomies Tools to manage your own.
Hope this helps.

Resources