General WordPress question - wordpress

I have a project that i would like to complete in Wordpress.
Basically, the story is that I have 8 boxes on my page that would each be enclosed in their own div.
I want to have a form on another page that a user can fill out and they would get to choose a box in which to put images or text into. If a box is taken, they can’t choose that one and must choose another.
What would be the best approach for this? I was thinking something like a CSS gallery type theme but how would I go about letting the user choose which box?
Any ideas and nudges in the right direction is appreciated.

I would do this in Drupal, or straight php. I think wordpress is going to be an impediment here rather than a boon. I would make each box a drupal block or node and use the standard form, to allow users to trigger editing that box. Then use CCK in control content like pictures and text and the way they display. Hope this helps.

The only way I can see this going anywhere is more or less completely bypassing Wordpress. So you use Wordpress only to render the theme, but the form action goes straight to PHP.
This way you're free to parse the form posts and store the uploaded images somewhere.
You could try to shoehorn everything into a Wordpress comment, but I don't think attaching files would work. So your best bet is to just have the form action point to a PHP file and handle everything manually.
It should be easy enough to query a custom table in the database using your theme's functions.php and $wpdb.

Related

How to make the ACF editable with a front end view

I'm making a website and the client wants to edit titles, contents, img,... directly with the front end view to see the changes. What is the best way to do it ?
I need something like ACF's flexible content to add a section, then a way to edit the acf field with the front end view of the site.
I looked for elementor and gutenberg but i don't know if is it the best solution, i dont want a block editor, i already have my design and the client just need to edit it seeing directly the change.
Thank you for your time :)

Is there a WP Bakery-compatible WordPress plugin that works on multiple blocks?

I need a WordPress plugin that will let me hide a bunch of content until a user clicks on a Read More link.
Sounds easy, but here's the twist:
I need to hide both text and images
The content is set up in separate WP Bakery blocks
All the plugins I found so far only work within a single block, they can't hide multiple blocks.
I'm a designer, not a developer, so I'm sure I'm missing something. Is there a reason this can't exist?
Please halp! I really don't want to redo the content.
I talk in pictures better than in words, so here's an illustration of what I mean

How to have single-slug behave like a normal page in WordPress?

I'm making a website in WordPress, and I'm using a plugin ACF PRO. I'm doing the entire site with flexible content, so the WordPress site is like a page builder.
Everything is fine, however, I came to a point where I need to have same functionality for single-[custom-post-type], so I can "Add row", header, footer etc... on it, but I can't figure out on how to do it.
I know that it's possible, because e.g if you look at this site here: https://rolleragency.co.uk/our-projects/
You can see that it works. I know they are using flexible content because I worked on that site and I did there what I wanted. I can't remember how to do that.
I think I had to use a Tempate Page? Or? I can't remember.
THe site is built entirely on flexible content, so everything there is modular and it's like a drag and drop, but how do I do that on single-slug?
You have to create a page template, yes.
So something like page-projects.php then in WordPress admin you would have a page called Projects.
The template you created should be automatically applied to this page. If it doesn't for some reason you can choose which template WP should use on the right side when editing a page.
Now, you can add whatever code you need to the page-projects.php. And also any fields you may need for that page you can set up in ACF by telling ACF to apply those fields to pages that use projects template.
This is how I would and did do it on several occasions :)

WordPress, code in html editor or code in index.php?

I'm volunteering to create a website and i've come across this dilemma with WordPress. Say the client deletes or edits a Page/Post in the visual editor, that could remove html code in the html editor.
The solution i've thought is to have text only in a Post, the html will be in index.php and the Page/Post will be fetched from index.php.
But for a particular page i have 30 pieces of text each inside an element with different colors. Would it be wise to fetch each individual Post from index.php or is there another way to prevent html code from being removed?
I'd like to point out, the client doesn't know anything about HTML, so i'd like to make it as easy as possible for them, simple editing of text and images. I don't want them to edit something in the future and the code is gone.
How do you WordPress developers approach this situation?
If you want this level of control, it is often helpful to use post 'custom fields'. This is pretty simple, it is a selectable field in the top dropdown when you are in the page/post editor.
http://codex.wordpress.org/Custom_Fields
You can then access the custom fields in your php files using the get_post_custom() function.
Here's more detail: http://codex.wordpress.org/Function_Reference/get_post_custom

Which WP plugin for enabling users add posts without registration?

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.

Resources