Adding a div at the bottom of a sidebar
You can use jQuery $(‘<div id=”your_div”></div>’).insertAfter(‘#sidebar_container_id’); Documentation
You can use jQuery $(‘<div id=”your_div”></div>’).insertAfter(‘#sidebar_container_id’); Documentation
WordPress has a function called register_deactivation_hook which registers a plugin function to be run when the plugin is deactivated, so: register_deactivation_hook( __FILE__, ‘myplugin_deactivate’ ); function myplugin_deactivate(){ //delete plugins option here ex: delete_option(‘pa_options’); } Update: Like One Trick Pony mentioned, sometimes users deactivate plugins and when they reactivate it they will loose all settings if you … Read more
I can’t tell you the answer to this off the top of my head, but if you want to look at the SQL queries (among other things) executed for any given page load, check out the black box debug bar plugin. I think that the debug bar plugin might have similar functionality as well. Regardless … Read more
You might consider the idea of creating a custom post type called ticker. On the custom post type, add a custom field (input field) and store it as the value. Then one option would be to use code of this nature in your homepage template: <?php $args = array( ‘numberposts’ => 5, // how many posts will be in the … Read more
Short answer – no. Long answer – WordPress retrieves and stores info in the database. To pull and push that data live to multiple locations simultaneously would tax the vast majority of users’ servers beyond their capabilities (especially shared hosting). It does let you know when someone else is editing a page or post, but … Read more
This is most likely because of file permissions on your server. WordPress needs to be able to write to the wp-content folder. I highly suggest you read this article about changing file permissions for WordPress. You may also need to CHOWN the directory that contains WordPress to the user that your web server uses. More … Read more
You can use the global variable $menu to see which top level menus are registered. function determine_menus() { global $menu; //echo ‘<pre>’; print_r($menu); exit; // uncomment to see the array of menus in back-end } add_action(‘admin_init’, ‘determine_menus’);
With s2Member, you can forget about the membership levels and sell access to individual pages/posts, too.
plugin_basename is a WordPress function that gets your plugins file name by simply passing it the directory. When you call $this->plugin_basename PHP is looking for a function plugin_basename defined within YOUR class. No function plugin_basename() in your class == PHP Fatal Error. If you simply want to define a variable that contains the plugins file … Read more
The fb-open-graph.php (latest version’s file) right inside the extracted folder of the plugin is (solely) responsible for adding Open Graph meta data to the header of your site. Below is how I’ve modified the code in the file so that it’s fit to be added to your theme’s functions.php: /* Facebook Open Graph Markup In … Read more