Is there a way to alter the order in which the plugins appear in the page?

From your comment it looks like you almost got it, Plugins that add something under your content usually use the_content filter by calling a function using add_filter for example outbarin plugin calls it like this: add_filter(‘the_content’, ‘outbrain_display’); so the way your can order them is by passing the priority parameter add_filter(‘the_content’, ‘outbrain_display’,99); But changing it … Read more

WordPress converting my code

<script> tags go in the document head, not in the document body (or, if in the document body, they should be the very last thing before the closing </body> tag. Besides, if you’re adding code of any sort in your post, you’re going to run into issues if you use the Visual editor, or, more … Read more

Override plugin with functions.php

You can change the name of add_gpp_gallery function both in the callback and in the declaration to avoid the conflict between the original and your clone. Something like this… add_action(‘wp_head’,’jason_add_gpp_gallery’); function jason_add_gpp_gallery() { if ( is_single() && ‘your_post_type’ == get_post_type() ) ){ remove_shortcode(‘gallery’, ‘gallery_shortcode’); add_shortcode(‘gallery’, ‘gpp_gallery_shortcode’); } } … should work for you. Bonus: You … Read more

Problem Building a Simple Google Maps Plugin

Wierd, just re-read your comment and looks like your shortcode is working when you call it that early – if the map-canvas div is showing up. here’s the code I tested, also added jquery as a dependency for your custom script & changed some css on you div… function lax_google_map_init() { wp_enqueue_script(‘google-maps’, ‘http://maps.googleapis.com/maps/api/js?sensor=false’); wp_enqueue_script(‘lax_google_map_script’, plugins_url(‘js/lax_google_map_script.js’, … Read more

wordpress reusable content blocks

One of two ways: Add a shortcode, so someone could drop in [content-block id=”12″] wherever they wanted. Here’s a very simple example without a lot of error checking. <?php add_action( ‘init’, ‘wpse29418_add_shortcode’ ); function wpse29418_add_shortcode() { add_shortcode( ‘content-block’, ‘wpse29418_shortcode_cb’ ); } function wpse29418_shortcode_cb( $atts ) { $atts = shortcode_atts( array( ‘id’ => 0 ), $atts … Read more

Show only preview of posts on the homepage?

Look somewhere after the “Loop” starts (it starts with <?php while( have_posts() ): the_post(); ?>) in your index.php file. Find <?php the_content(); ?> and change it to <?php the_excerpt(); ?>. If you don’t want any content, just remove the_content() all together. If you’re using a theme from wordpress.org, it would best to do this in … Read more