WordPress.org

Ready to get started?Download WordPress

Forums

Front-end Editor
Problems Creating posts (4 posts)

  1. Gaby77
    Member
    Posted 1 year ago #

    I have installed the plugin and it works ok, but I don't understand where to put this code to be able to add new post.

    <?php fee_inject_dummy_post( 'post', false ); ?>

    <?php while ( have_posts() ) : the_post(); ?>
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <?php the_title(); ?>

    ...
    </article>
    <?php endwhile; ?>

    It says in the home.php template file, but in the directory of my theme there isn't a home.php file. I tried writing it in index.php file but it doesn't work.

    Please Help!
    Sorry for my english.

    http://wordpress.org/extend/plugins/front-end-editor/

  2. houseofstrauss
    Member
    Posted 1 year ago #

    I think home.php was used as an example only. It might be more suitable to create a new page (ie postform.php as a custom template see here and place the code to render the form (as your post above) in that custom page. Usually, I would use the existing page.php as the base of the new page postform.php and follow the instructions as for custom page templates.

    Basically page.php would be copied, post form code added and renamed to postform.php Then in the code at the top of the page add

    <?php
    /*
    Template Name: postform
    */
    ?>

    save all and upload postform.php to your server theme files

    If this form is just for you, or your editors, don't place it in the site menus and call it manually any time you want to create a post from the front end. The post form will appear only in that new page, that should do it. AS always experiment on a test site first.

  3. Gaby77
    Member
    Posted 1 year ago #

    Thank you for your answer. I'll try it.

  4. kisshomaru
    Member
    Posted 10 months ago #

    Why isn't there a shortcode for this to add it on any page? A template? really? and create it myself?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags