• hi friends,
    i want write code to save current home-page as new page, for example by a button in admin nav-bar.

    please help… thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi! Thanks for writing. I saw a plugin that says it can clone a page.

    Although I haven’t used it myself, I thought I’d tell you about it to keep this conversation going, and because it seems to say that it can do something similar to what you are asking for. (and since the plugin is on github which is freely accessible to us)

    How close is this to what you are looking for?

    https://github.com/EvanHerman/wp-page-cloner

    Let me know how you go?

    @mailalaki Hi, an update on this, I installed the wp-page-cloner (wp-page-duplicator) script (WordPress plugin) and did an initial test. It did allow me to clone a page.

    Link to descriptive screenshot showing the plugin installed and the “Clone Page” link-button available for each page in the list of pages:

    https://cldup.com/_p-nhxfe3g.png

    @mailalaki – How close is this to what you want?

    P.S. I wonder whether @eherman24 & co. has plans to try to put this plugin on the WordPress.org repository?…

    Hi Mjasesen,

    Thanks for pinging me here and dropping a mention to my page cloner plugin. I actually wrote that plugin along with one of my close friends to help explain some of the fine details that go into plugin development.

    The plugin was my friends idea as he had a need for it at the time. I didn’t have any plans to release it to the repository but can certainly see how it would be beneficial to others.

    I love helping others out, so if it’s something that can be used by many people I’m more than happy to share. I’ll see about getting the plugin into the review queue for the plugins repository today. If accepted, it should be live in the repo in the next day or two.

    Thanks again!
    Evan

    @eherman24 Hi! thanks for thinking of this request, and offering to start the process of trying to get the plugin published!

    I’m really happy that you’re reading, replying, and willing to share.

    Yes, by running a test I see that the plugin does the functionality — the functionality that it seemed @mailalaki was asking for in the original post above.

    Hi @mjassen,

    No problem at all. Always glad to share my work with others, especially when it helps out in one way or another.

    Since I last posted here I’ve updated the plugin to transfer taxonomies and meta data, and to work with any custom post types registered on the site.

    I built out an options page that allows users to turn on/off the clone functionality on a per post type basis. I have also gone ahead and added it to the repository. It’s currently in the queue awaiting it’s initial review.

    There are currently 102 plugins before ours, so we’ll see how long it takes to get in there. I will post back here when it gets approved!

    https://github.com/EvanHerman/wp-page-cloner

    Thanks again!
    Evan

    Hi again @mjassen & @mailalaki,

    I’ve got things up in the repository:
    https://wordpress.org/plugins/post-cloner/

    Thanks again for mentioning me here Morgan, it certainly helped expedite things on my end in getting it into the repository.

    On another note, I’m looking forward to WordCamp NYC next month. Any chance your going again? I’m glad we got to meet last year. Hopefully I’ll see you there!

    Evan

    @eherman24 Hey! Thanks so much for this effort! I hope it can help @mailalaki as well as another person who wants to clone a page. From looking at the description, it seems it can clone other (simlar-to-page / page-based) things as well. I’ll see what I can do to follow/support the plugin going forward.

    Nice cloned sheep art, too.

    As for WCNYC, i wish! I’ve been looking at the dates and logistics for WordCamp Rhode Island, NYC, and US(Philadelphia), however, I haven’t set plans for any of them yet. @eherman24 I hope that we can meet again soon though!

    @mjassen, Thank you for the kind words! I appreciate it. I’m more than willing to take on any pull requests or suggestions for future versions. At the moment I plan on integrating with EDD and WooCommerce. I’ll see what other plugins I can come up with to integrate with.

    And yea man I completely understand. They are all occurring right around one another so it would be quite hectiv to go to all of them. I’m lucky that some of my family lives up by NYC so travelling up for the weekend won’t cost much.

    I’m also very lucky that WordCamp US will be taking place in Philly this year so I don’t have to travel at all…It’s literally a 10 minute walk from my house!

    If you get a chance to make it to either of those, please let me know and we can meet up at some point, maybe for lunch or we can hang out at the dev talks together.

    Evan

    Thread Starter mailalaki

    (@mailalaki)

    Hi friends @eherman24 & @mjassen.
    thanks for the guides and I’m sorry for late…
    I check my friend’s @eherman24 code, but finally I would like have the opportunity to be able to save a clean Html page (without functions & one file) from current homepage as a new page in page lists…

    may help me in this case???
    thanks

    @mailalaki , hi!

    In WordPress, a page is saved in the database as opposed to as a file. Is it desired to save the homepage not in the database but rather as a file? Can you explain a little more?

    In WordPress, the html code for a page can be (to some extent) hidden — I mean text of a page is visible in either the Visual editor or the Text editor, but unless one explicitly pastes html code in the Text editor, one won’t see html code. In light of this, is it desired to save the page as html code? Can you explain a little more?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Save Current Homepage as New Page’ is closed to new replies.