Remove the ‘Press This’ Tool

Adding the following action essentially disables the press-this functionality, at least best I can tell: add_action(‘load-press-this.php’, function(){ wp_die(‘”Press This” functionality has been disabled.’); }); The option will still be there on the admin dashboard page, but attempting to use it will fail.

How does one programmatically manage posts from a external php script?

You can remotely create posts programmatically via XML-RPC e.g. PHP http://www.nickycakes.com/post-to-wordpress-remotely-with-xmlrpc-in-php/ Java http://code.google.com/p/wordpress-java/ Of note, the media library handles image EXIF data etc, it might be more convenient to switch from using posts to just displaying the latest uploaded attachments that do not have a parent post (attachments with a parent post are attached to … Read more

What is Global WordPress Objects?

As I’ve mentioned in the comments – you shouldn’t need to modify / touch WordPress globals directly. It seems you are getting the errors because you are trying to load WordPress within Smart – this is a bit of a hacky approach. I’ve not used Smarty at all, but WordPress has its own way of … Read more

Save Option on Database

<?php add_option( $option, $value, $deprecated, $autoload ); ?> http://codex.wordpress.org/Function_Reference/add_option global $options; ?> <form action=”options.php” method=”post”> <?php $settings = get_option(‘options’); ?> <?php settings_fields(‘theme_options’); ?> <fieldset> <legend>Counter Position:</legend> </br> <p> Right <input type=”radio” name=”position” value=”right”/> <p> Left <input type=”radio” name=”position” value=”left”/> <p> Center <input type=”radio” name=”position” value=”center”/> </fieldset> </form> <?php function r_set() { register_setting(‘theme_options’, ‘options’, ‘validate_options’); } … Read more

Remove “minor-publishing” div from Publish admin metabox

In short- no. The html in question is hard-coded in the post_submit_meta_box callback function. You can, of course de-register the publish metabox and re-register your own which mimics post_submit_meta_box (but making your alterations) and being sure to keep the names of the inputs exactly the same. This method has been outlined the following posts where … Read more

How can I add more code to this?

To insert new code you need to break php code and past your new html+/-php code. But pay attention that after passing all will have correct syntax. Your question should be made like this: <?php $my_query = new WP_Query( “cat=11&posts_per_page=1” ); if ( $my_query->have_posts() ) { while ( $my_query->have_posts() ) { $my_query->the_post(); ?> <h2><a href=”https://wordpress.stackexchange.com/questions/53008/<?php … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)