• jerems

    (@jerems)


    Hi there,
    I have an issue while trying to put a shortcode in my code.
    In the plugin I’ve set the page I wanted the shortcode in. And in this page I’ve put the basic Frontier shortcode.

    In my code I’ve done this :

    <?php
    // If this one is in comment I've got the form for add/edit, but when submitted nothing happens. If not everything works but I've 2 forms and one is incomplete(the second)
     //echo do_shortcode('[frontier-post]');
    ?>
    <?php
    if(isset($_GET['task']) || isset($_GET['preview']) ){
            // to go for an edit or preview (there's 2 links buttons)
    	$shortcode = '[frontier-post]';
    }elseif(isset($_POST['cats'])){
    	// to go for a new post with dynamic categories
    	$shortcode = '[frontier-post frontier_cat_id="'. $_POST['cats'][1] .','. $_POST['cats'][0] .'" frontier_mode="quickpost"  frontier_force_quickpost="true"]';
    }
    echo do_shortcode($shortcode);
    ?>

    There’s probably something I did wrong, but I can’t find out.
    (Sorry if it’s an already solved issue, I haven’t found it)

    • This topic was modified 7 years ago by jerems.
  • The topic ‘add/edit post not working’ is closed to new replies.