I want to add the user registration form to several pages in WordPress.
Until now, I couldn't find any solution for that.
I tried to copy the form from the WooCommerce login/registration template.
Unfortunately without success.
Is there any way to do this without a plugin?
Maybe I made a mistake at my first try to solve that problem.
You could copy the form from the file /wp-content/plugins/woocommerce/templates/myaccount/form-login.php and use it everywhere on the site.
Works fine ;)
Related
I'm a complete Wordpress Newbie and I'm confused on exactly how hooks work. I've been trying to use Contact Form 7 to send information to an external database, and so far I've found a plugin that seems to do exactly that. But where exactly should I be putting this code?
In WordPress, you can add a hook or filter in two ways.
Create your own plugin and add your code so whenever the site load or hook call the code will be executed.
For example, the link you have added plugin.
You can add the same code in your theme file function.php
Both option has it prons and crons.
So I am trying to do this and I don't know how. I have a wordpress powered website with a plugin called "frontier-post" in it. This plugin makes a new front-end post submission. The way to use it is to put the shortcode "[frontier-post]" in any post in my wordpress page and that page turns into this.
I want to make a custom page for myself, where I can have the content created by this plugin there too. So I do not want it to be a post in my wordpress, but lets say at a corner in the custom page. I have searched and found these but the suggestions there would not work. I am able to include the wordpress so that the custom page has access to posts, etc. but even using this
echo do_shortcode('[frontier-post]');
would not help me. (even if header is included)
These are the similar things i found:
Wordpress/PHP - How to use plugins outside wordpress-powered pages?
Need Help for my Custom Page Template
I would really appreciate it if you could help me with this.
If you are creating a PHP page that isn't going to be rendered inside WordPress, you can't use a Plugin of the WordPress engine to accomplish what you are wanting to build. (As the accepted answer to one of the pages you link to indicates).
Instead, you might be able to use the json-api plugin and have your custom page query it for the data. While it won't render the shortcode, it will give you the raw data to work with.
http://wordpress.org/plugins/json-api/
Edit:
Based on a comment, your do_shortcode should work...just try it without the square brackets.
I'm creating a webpage using wordpress. I wanna insert some element in the form as hidden but the comment tag is not working. the wordpress is putting the comment tag within a 'p' tag.I used all methods of commenting.It is not working.
Can anyone tell me how to insert comments in a webpage using wordpress?
thanks i advance.
I take it you are trying to build a form using the add/edit page screen in wp-admin i.e. wp-admin/post-new.php?post_type=page? If so, you might never succeed in your endeavour, but I would give it a try using tinymce-advanced plugin, as you can turn a lot of the filtering of your source code off, and this might solve the problem. Try it, if not let me know and I will tell you how to manually add functionality to stop Wordpress from messing with html code in wp-admin text editor.
I would like to know which WP plugin should I choose to allow every user who come to my page to add a post to my page form the frontend.
He just click on a button add a new post or something like that. Than a form appear and he inserts the title and uploads an image.
After that its published as a post.
Is there a solution like this available for WP?
Thanks in advance.
From what I know, there is no existing plugin doing it as you need. Even if it existed, I wouldn't recommend it's use for security reasons; it is hard to follow every uses and make sure visitors would post the way you want.
You are definitely better to code it by your own, and it's quite simple using the wp_insert_post function. This function will work anywhere you put it inside Wordpress (no need to build a plugin from scratch), so a simple form with validation would make it.
Hope it guides you on what you're looking for.
I'm making a wordpress site which looks like and behaves less like a blog and more like a classic web site. I need to make plenty of custom forms and by now I have three equally bad solutions to this.
One would be to create each form as a theme template file. Those pages would submit data to themselves and all would be great, except the fact that I don't really like my plugin and theme to be so hardly connected. I think that theme should be for design only, which means header, footer, etc... and that plugin should handle all the other work.
Second solution is to make some controller.php file somewhere in my plugin folder and then all requests should be directed to this controller which would control what page should be displayed and how. And each page should be made with the use of WP short codes located inside my plugin folder. Problem with this approach is that I have problems transfer POST parameters, after I submit a form. I would submit a form to my controller which would then redirect it to a page with all POST parameters lost.
Third solution would be to target actual pages which display content with the use of WP shortcodes, and when user successfully submits the form shortcode would instead of the custom form, return some Thank you message. Problem here lies in fact that if you hit refresh while Thank You message is displayed browser would submit the form once again. And again and again, every time you'd press refresh.
Simple question. How would you do it?
Would it be the first way? I see many people doing just that, hardcoding their custom forms inside template files, even though it may be not the cleanest solution. Hmm... Still, I would like to separate my forms and logic away from my theme.
Greets
There are a couple of good form solutions as existing plugins. The two that come to mind immediately are Gravity Forms, which you must purchase:
http://www.gravityforms.com/
or Formidable Forms, which has a free basic version and a paid advanced version:
http://wordpress.org/extend/plugins/formidable/
I would definitely suggest using a plugin. It's best to keep design and functionality separate when possible. Both of these plugins are pretty simple to use. I know formidable uses shortcodes, but I'm not sure about Gravity Forms