Enable custom database table fields in Wordpress Elementor - php

I have an addition database table that was created manually not generated via Wordpress. I want to integrate this table into Wordpress so I can use within the dynamic fields options in Elementor.
Please can you advise the best way to to this?
I have found a plugin called metabox.io , but not sure how to do it via that either. I can see options to create custom tables via meta box, but not integrate manually tables.
Any suggestions appreciated.

the best way i can think of is to create a custom wordpress shortcode.
in the end you should have something like [custom_table id="1" column="db_column" condition=""], you will be able to use this shortcode in elementor dynamic fields.
i do not know about the plugin you mentioned. if you're not familiar with wordpress development you should hire a developer to do this for you.

Related

WordPress multiple content sections

Alright I am completely lost on how to do this so I am just going to throw the question out there and hope somebody can help me in some way or another.
WordPress offers the option to create custom Taxonomies so I got the idea of pulling something out of my hat and creating a custom content section apart from the content section wordpress currently offers.
The website shown above is the only website I have been able to find which currently does this and is on a WordPress platform, as you can see they have the SoundCloud audio player pushed over to one side with the actual content placed to the other side creating that flawless look.
I guess the question here is how can I turn <?php the_content(); ?> into something completely custom pulling from a completely different form in the back end so the same information is not shared.
There are numerous ways to achieve what you want.
Shortcodes
Custom page templates
Custom meta fields to store values like the soundcloud embed url, to afterwards use it in your code.
You can always also enter HTML in the page editor, but for obvious reasons not recommended.
Custom post types allow you to define a new type of content. It will have its own section in admin where you add and edit data separate from normal Wordpress posts. It can have its own templates allowing different layouts, and you can set up custom fields so that it can store different data.
I also recommend taking a look at the Pods Framework. This plugin allows you to define custom content types very easily in the admin interface. You can set up all your fields and data types from there. All that's required then is to create the templates to make it look nice.
The nice thing about these approaches is that while the data is kept separate from standard Wordpress posts, you still have the same familiar UI, so it's easy for none-technical users to update the content.

Creating a relationship between two custom types in WordPress

This is perhaps a very basic Wordpress development question. I am aware about creating custom types in Wordpress. So I created a Product type and a Version type and I would like to be able to keep a one-to-many relationship between the two i.e. for every Product, I would like to be able to associate one or more Version items from the admin editor. What is the way to do this? I am not in favor of using plugins, so I was thinking, I would use some kind of a custom field array of IDs, to connect the two. Am I on the right way? If I have to use a plugin, which one should it be?
The easy way to do this would be to add a meta box on your product admin page. That way you can create a drop down list on your product page with your versions. You can get more on adding meta boxes using add_meta_box here.
You add all required functions to your themes' functions.php, but to summarise you will need the following wp functions amongst others.
add_action
add_meta_box
update_post_meta
Looking up these functions in the Wordpress Codex (using google) will get you on your way. If you get stuck, post some code of what you have tried and take it from there. There are a number of tutorials/examples around. If you can do enough to create custom types this should not take you long.

Creating WP custom post types with custom fields from database

I'm working on a Wordpress website that uses an external system to sell tickets. This ticket system provides a WordPress plugin that automatically creates and updates two new WordPress database tables: events and shows. That's great, but that's all this plugin does.
I have used the Database Browser plugin to test if the database tables created by the ticket system plugin were there and that was the case. I can see all the data there too. So far so good.
I now need to create custom post types (events and shows) with custom fields using the data from these database tables. I've searched, but I can't seem to find out how to create custom post types that pull their data from existing database tables.
Maybe I'm looking at this all wrong. Any help to point me in the right direction?
To create custom post refer this http://codex.wordpress.org/Post_Types#Custom_Post_Types
And use this plugin to create custom field http://wordpress.org/plugins/advanced-custom-fields/
i'm assuming you realise that you'll need to write code to query db...there are no plugins to query a db (that i know of).
it also sounds like you are going to duplicate data ie pull data from custom table events and shows, then add to this data to custom fields. i'm not sure this is the best approach.
also, if data in these custom tables change, will it be reflected in your custom fields data?
have i assumed too much? let me know.
To query db, use the wp class wpdb. I havent really used it but it has enough features to do what you want.
acf plugin has already been mentioned. custom post type ui plugin is easy for creating custom post types with no code. it even prints out the actual code for you so you can copy it, place in functions.php, then disable plugin, nice.

Custom Wordpress Tag Cloud

I'm pretty new to Wordpress and I need your help.
I use WP-Polls plugin and I want to build a tag cloud for it. It would show most popular polls. I'm wondering how I can do that. I've tried creating my own taxonomy but with no luck. I'm not sure if I understand it correctly but Wordpress allows to create taxonomies for wp_posts table only. Is it correct?
Do you have any idea how I could solve the problem?
Thanks a lot!
It can be done using wp_generate_tag_cloud. I have created a plugin that retrieves all the info from db and pass it to the above mentioned function.

How to integrate a custom form and add/edit/delete on wordpress

i want to create a custom form with some fields that i could add/edit/delete on database
how integrate my form with wordpress?
do you know a website ,that have a tutorial about this process ?
thanks
There are plugins that allow you to create custom forms (cformsII), and with some additional PHP knowledge you can retrieve the data using their API. I found this tutorial that quickly goes through installing, configuring and retrieving data from this plugin. That same page also listed some additional forms plugins that are worth looking at.
Another option is to do this using HTML and PHP without the use of a plugin. The following link will give you some insight in how to start and some code that can get you started:
http://www.paulmc.org/whatithink/2009/02/05/using-wordpress-templates-to-create-forms/
Note: There is a plugin called Formidable but only the Pro version allows you to easily retrieve the data from the database.
This is a really involved question, so it shouldn't be asked here.
P.S. Not specific to WordPress but http://teamtutorials.com/web-development-tutorials/php-tutorials/inserting-data-into-a-mysql-database-using-php

Categories