• Resolved ihaleboop

    (@ihaleboop)


    Hi,

    I’m new with this plugin. I managed to create two pages with Elementor allowing to create and update the content of a CPT created with ACF Pro.
    For the creation of the content of the CPT, no problem.
    On the other hand I encounter a problem because I don’t understand how the plugin works for the update.
    In the Actions area of the widget in the Elementor page, I chose: edit post.
    In the Post area of the widget I did a test with Post to edit = select post and I selected a specific CPT. No problem, it works.

    What I’d like is to make it dynamic. In other words, I’d like the user to choose in the posts he has access to, the one he wants to update.
    At the moment, I don’t see how to do that. I have created a CPT Archive page and the user can see all the CPTs, but how do I link to the Elementor update page by passing the CPT ID as a parameter?
    Unfortunately, I have not found any examples that explain how to do this.

    Thank you in advance for your help.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Shabti Kaplan

    (@shabti)

    There are two ways to do this. I will explain, but first I need to know:
    Are you using Elementor Pro?

    Thread Starter ihaleboop

    (@ihaleboop)

    Hi @shabti

    Yes I use Elementor Pro
    Thank you

    Thread Starter ihaleboop

    (@ihaleboop)

    Hi @shabti
    Here’s what I have done.
    I have created a page where I display the archive of my CPT.
    When I click on a CPT in the list I open an Elementor template page where I have placed your widget.
    The chosen action being the update of the CPT, this seems to work.
    Nevertheless you told me about 2 ways. What could be the second one? Is it the addition of the Edit button in the Archive page? If yes, how to do it?
    In addition, I would like to know how to put the date and time display in European format when I use drafts and in particular when I choose a draft via a list.
    Thank you in advance for your help.

    Plugin Author Shabti Kaplan

    (@shabti)

    Oh my, we have busy, and I never got around to explaining the process. I am really glad you figured it out yourself though!

    To answer your questions:

    The second method is to use a URL query to edit the custom posts dynamically, meaning you have a page called “edit CPT” for example. If the url has in it a parameter “post_id=5” then this form will edit post ir CPT with the ID of 5. To use this, choose Url query under “post to edit” in the Post tab.

    Regarding the dates format, I will put that on the list of tweaks that we will make. I will let you know when its ready

    Thread Starter ihaleboop

    (@ihaleboop)

    Hi @shabti
    Thank you for your answer. It works fine.
    A new question.
    During my test I try to update a post. This post is linked to a category & a tag.
    Because I want to update this post I use the Edit Post Action.
    When I am in the form I can change all the fleids but I have a limitation with the category & tag fields. I can’t add a category or a tag. I can check & uncheck a existing category or tag but it’s impossible to add one. Perhaps a proper working ?
    Thank you.

    Plugin Author Shabti Kaplan

    (@shabti)

    I get this type of question all the time and I was hoping to make a video tommorow.

    All you have to do is create a taxonomy field, select category as the taxonomy, turn on “save terms”, “load terms” and “create terms”, add this field to your form, and disable the default categories field. Same goes for tags

    haniefs

    (@haniefs)

    The second method is to use a URL query to edit the custom posts dynamically, meaning you have a page called “edit CPT” for example. If the url has in it a parameter “post_id=5” then this form will edit post ir CPT with the ID of 5. To use this, choose Url query under “post to edit” in the Post tab.

    @shabti First of, thank you for this plugin I don’t need to mess around with page template 🙂

    I’ve been looking for a way to dynamically set which post to edit, and I’m aware of this query parameter, it works. The problem is user can easily change this parameter value and will be able to edit other post.

    I propose you could add dynamic tag for “Select Post” control for post_ID, so we can put shortcode to generate which post we need to edit.

    @ihaleboop I’m sorry I’m hijacking your topic.

    • This reply was modified 6 years ago by haniefs. Reason: format
Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Update Post with CPT’ is closed to new replies.