I'm having major problems with this. Basically, I need to add a "url" field to the event management plugin with wordpress. My client wants to be able to add a url to their event so it can be clicked and viewed for more information on the event. I've looked through everything and im having problems understanding the wordpress file structure. I tried to add my own field to the event editor, database and front end but i dont know where wordpress posts the data to so i cant receive the variable. If i could get the variable, i could probably figure out how to use $wpdb relatively simply. but for that matter, i dont know where i should use that. where is the file that makes all those calls? i shouldnt have a problem getting the data from the database.
Edit
My problem, as described, was solved by installing another plugin called PODS. the only solution to adding functionality to a plugin, as in other fields, is to write your own plugin (as far as im aware). PODS solved my problem. It allowed me to add another field to the front of the event management form and saved it to the database. I still had to retrieve it from the database and display it on the front myself with php, but it was a much easier task than i expected it to be. If anybody wants to add extra fields to a plugin in wordpress, PODS is what i'd suggest. It's also free.
Related
I would like to implement a Custom Search Plugin for Joomla 3.5.1. I am new to Joomla and still busy getting my feet together.
I recently implemented a plugin that adds custom/extra fields (5 fields, free text inputs) to an article in Joomla 3.5.1. I followed their tutorial on how to get this right and so far so good. This plugin saves the extra/custom fields in the #__user_profiles table as per their tutorial. I could obviously save it to a different table but since I am learning, I kept it simple. This plugin works perfectly and I can capture the extra fields and saves successfully and the data is saved along with the article id being edited/created.
My next task is to create another site/front-end "search" (or smart search) plugin. This plugin must group the 4 field's values and provide them to the user in the front-end as selects/dropdowns.
Is there someone that can give me a lead on how I can archive this. Must I implement it as a search or smart search plugin? Is it even possible to archive what I am trying to archive?
This search plugin will only appear on one page but that I know I can config correctly once I've a plugin. Once user searches, the system must post back the selected options and I will search the "#__user_profiles" for any matching profile_key vs profile_value and collect all user_id (article_id) and get these articles from contents table and return this list of articles to the front-end as search results. Anyone can help me into the right direction?
I tried their tutorial of creating a search plugin but I seem lost, mostly I don't know how to dynamically provide my selects/dropdowns with that info saved in the #__user_profiles table.
Please assist in anyway possible...
I don't think that this might be done without modifying core 'search' task. My advise is to advise search view and include extra filtering, then write own 'search' task which allow you to read this data and provide additional results.
By writing just search plugin you can only extend search results by data which is stored outside default Joomla! tables but nothing more.
After providing an event calender with PHP/MySQL/HTML/CSS I want to use Wordpress for that project from now on. Account and data management will remain outside of wordpress scope.
My best idea so far is to populate the posts (or pages) entirely from the already existing db. The URLs would be created by apache's rewrite engine.
To use one post and populate just the content would lead to really bad SEO.
So I want to create (virtually) unique posts populated entirely from the db. Extensive research on that topic brought up nothing usable so far. Maybe someone could point me in the right direction?
Preferences:
using mod rewrite to create the pages urls from event /ID/title rather than using the timestamps to create posts
keeping the data editable via external admin panel (no copying into WP-DB)
head data of post / page must be populated from db, e.g. title, author, timestamp etc.
Suggestions would be much appreciated, thanks in advance.
Have you tried the plugin WP All import. It creates unique post such are car listing etc based on the external DB. I also allows you to style and format your post.
https://wordpress.org/plugins/wp-all-import/
I followed the below tutorials in order to create a custom post type with custom fields.
https://www.youtube.com/watch?v=-r1b0wA98Ew
https://www.youtube.com/watch?v=6URWfMTsWPo
This worked great and I added lots of data using the forms I'd created and had the data displaying on the front end of the website.
A week ago, the custom post type disappeared from the Admin Menu but the the data seems to be intact from the front-end point of view. I posted a message in the CPT UI wordpress forum and got told to simply re-add the post type and re-link the data back up.
My question is HOW do I re-link the data back up? I have re-added the Custom Post type so its ls listed in the admin menu, but I need to be able to edit the custom posts I have already added. Can anyone help? Not getting much help from the Wordpress forum. Thanks
AS the data is intact in the front end it means the entries are still in database and nothing is lost.
It is correct way to just re-add the missing post-type and WordPress will now automatically re-link/re-connect your existing data, since WordPress is storing custom post type in the wp_posts table with post_type field value to your user-defined value.
Just make sure that the post-type name is same as you used earlier because slight mistake in spelling will lead to data not displayed in admin panel as expected.
You can also post further details which would be helpful to get actual problem found out.
#leetee this has 50/50 chance, experimental and since there is no way to reproduce this behaviour; try exporting your custom post types by using Tools -> Export and then see if you could Import them into a fresh WP install...
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.
I'm trying to create a plugin in wordpress that allows you to age restrict certain posts and pages but not others. I looked for a plugin that does this and couldn't find one. I've got all the coding covered except I can't figure out how to instruct wordpress to save the state of the checkbox as data associated with that post or page. I dissected a couple of plugins that have similar functionality but am mystified by how their code works and it breaks when I try to modify it for my use.
Can someone point me to a tutorial that explains how data gets saved from the post edit page and how to access that data later?
check out post meta-data :
http://codex.wordpress.org/Custom_Fields
The basic idea is WP allows you to add additional fields to a post, and then retrieve it during the loop. Just use this field to test against at render-time and display alternate content, should (in this case) your post be restricted.
The codex is pretty thorough on the subject, and I'm sure google can fill in the gaps -
Hope that helps