laurgaut
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
I thing you can delete .add and .attr lines.
But it is strange your code does not work.Sorry, I did this a long time ago, I remember I had to modifiy plugin to do what you want. I created class fee-new-post and modified fee-adminbar.js file. The plugin accesses to the link with jQuery.
<div class="fee-new"> <?php if (is_user_logged_in()) { echo '<a class="fee-new-post" href="#">Create a new post</a>'; } ?> </div>and you have to update the file fee-adminbar.js and add this code just after onclick event.
$('.fee-new-post') .add( value === 'post' ? 'a[href="' + fee.postNew + '"]' : null ) .attr( 'href', '#' ) .on( 'click', function( event ) { event.preventDefault(); _new( value ); } );This code will work but keep in mind that you will have to reinsert this js code after each plugin update.
Just add a link in your theme like this(index.php for example), post creation is managed by javascript in the plugin (with .fee-new and .fee-new-post classes).
<div class="fee-new"> <?php if (is_user_logged_in()) { echo '<a href="http://yoursite/post-new.php?post_type=\'post\'">Create a new post</a>'; } ?> </div>Forum: Plugins
In reply to: [Front-end Editor for WordPress] Custom Fields support+1
Viewing 4 replies - 1 through 4 (of 4 total)