Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Hassan Akhtar

    (@khaxan)

    Unfortunately this feature isn’t available right now. But it is a good idea and I might consider adding it in the next version.

    If you like the plugin, please consider giving it a 5 star rating.

    James

    (@jameshilliard)

    I assume what would be edited is in /front-end-publishing/views/submission-form.php:

    <label for="fep-category">Category</label><br/>
    		<?php wp_dropdown_categories(array('id'=>'fep-category', 'hide_empty' => 0, 'name' => 'post_category', 'orderby' => 'name', 'selected' => $post['category'], 'hierarchical' => true, 'show_option_none' => __('None'))); ?><br/>
    		<label for="fep-tags">Tags</label><br/>
    		<input type="text" name="post_tags" id="fep-tags" value="<?php echo ($post) ? $post['tags']:''; ?>"><br/>
    		<div id="fep-featured-image">

    Any tips would be appreciated now ??

    James

    (@jameshilliard)

    I will give you a 5 from five accounts if you just whisper how I could easily hard code 3 categories to choose from!!!

    James

    (@jameshilliard)

    James

    (@jameshilliard)

    FOUND THIS CODE HERE>>> https://www.google.com/search?client=safari&rls=en&q=restrict+categories+wordpress+show+on+editor&ie=UTF-8&oe=UTF-8

    wp_dropdown_categories( array(
    ‘include’ => ’58, 3′,
    ‘name’ => ‘category_id[]’,
    ‘hide_empty’ => false,
    ‘echo’ => false,
    ) );

    UPDATE: I found adding this line I was able to restrict the choice to just 2 categories:
    ‘include’ => ’58, 3′,

    James

    (@jameshilliard)

    James

    (@jameshilliard)

    @wolfang8

    Find the file> front-end-publishing/views/submission-form.php

    Replace:
    <?php wp_dropdown_categories(array(‘id’=>’fep-category’, ‘hide_empty’ => 1, ‘name’ => ‘post_category’, ‘orderby’ => ‘name’, ‘selected’ => $post[‘category’], ‘hierarchical’ => true, ‘show_option_none’ => __(‘Choose Below’))); ?>`

    WITH (Replace value with your category id…):

    <select name="post_category" id="fep-category" class="postform">
    	<option value="-1">Choose Below</option>
    	<option class="level-0" value="11">BAD</option>
    	<option class="level-0" value="13">General</option>
    	<option class="level-0" value="3">MemEPuN</option>
    </select>

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How do I restrict categories?’ is closed to new replies.