How to include the admin bar?
have you looked at the codex ?? : http://codex.wordpress.org/Function_Reference/add_menu you do NOT need to load any WP files like you are doing if you’re code is for a plugin!!!
have you looked at the codex ?? : http://codex.wordpress.org/Function_Reference/add_menu you do NOT need to load any WP files like you are doing if you’re code is for a plugin!!!
Preview own posts if logged in
The cause of this problem is the wordpress checking for his cookies – and cookies are different for each folder. So the way of fixing can be temporarily save WP cookies too session and then hardcode them after redirect before the WP load. Solved thanks to https://stackoverflow.com/questions/21542795/wordpress-allow-previews-outside-wordpress-folder
Asking this question gave me an idea. make the single-[posttype].php and inside it just put <?php wp_redirect(get_page_uri(get_page_by_path(‘your-page-slug’)); ?> also works with get_page_by_title() This will direct the preview post and view post link on the admin create post page to the page you want.
I found the setting in WP -> Theme Panel -> Categories
Instead of disabling it, you’d be better off by hiding it using a bit of CSS trickery. Try this and let me know if it works: add_action(‘admin_head’, ‘hide_quick_view’); function hide_quick_view() { echo ‘<style> span.view {display: none !important; visibility: hidden !important; opacity: 0 !important;} </style>’; } This should be placed in your functions.php file.
Post preview in iframe without saving the post
There are tools available for simplifying the synchronization of databases between multiple WP installations, such as WP Sync DB. As @jdm2112 mentioned, using a copy of the database—versus attempting to use the same database—reduces the risk of development work interfering with the production environment. However, simply making a copy of one site’s WP database is … Read more
The problem was due to a security setting in the server (Apache). Changed a rule and voilà!
The above code is working fine for me. I let it here, because someone might need it or have suggestions to do it in a better way. My problem was that the enqueue of js had loaded an old js file… .