Get string from array and start loop [closed]

Interesting! Looking at the bp_group_has_members it allows to to pass only single group using the group_id parameter when my first thought was that it would be able to pass an array of groups. using your method you will need to run the loop multiple times in order to get the results you want. What i’d … Read more

Shortcoding with Divs

This should do the trick: http://codex.wordpress.org/Shortcode_API#Output Copying verbatim from the documentation: function myShortCode() { ob_start(); ?> <HTML> <here> … <?PHP return ob_get_clean(); } Basically what happens is that all your HTML will not be output, but rather stored in an “output buffer”, and returned by the function.

Show a Category Specific Info Box

There are multiple ways to print content on the front end. The “best” way depends on the details of the project and your description is very superficial. The option I can think of are: Just edit the appropriate theme template to use has_category to display your links to the category URLs Do the same as … Read more

Display WP posts in 3 responsive columns

<?php $the_query = new WP_Query(“showposts=6&cat=1&orderby=rand”); while ( $the_query ->have_posts() ) {$the_query ->the_post(); $i++; if ($i == 1){echo “<div class=row-fluid>”;} ?> <div class=”span4″> Random Post <?php echo $i ; ?> </div> <?php if ($i == 3){echo “</div><div class=row-fluid>”;} if ($i == 6){echo “</div>”;$i=0;} } wp_reset_postdata(); ?>

Banner editable from backend

Is there perhaps an easier solution than programming it all myself? Download the Black Studio TinyMCE Widget plugin from http://wordpress.org/plugins/black-studio-tinymce-widget/. Activate the plugin and drag and drop the Black Studio TinyMCE widget in your desired sidebar. Works great and tested with WordPress 3.6.1. Picture taken from the plugin’s screenshots.

What is the best way to get the first few post from WordPress in different divs using a loop?

Use this code for the loop. I removed your comments and added some for clarification. <?php if ( have_posts() ) { // Do first post. add_filter( ‘the_content’, ‘narga_excerpts’ ); add_filter( ‘the_content’, ‘remove_first_image’ ); the_post(); get_template_part( ‘content’, get_post_format() ); // Do remaining posts. remove_filter( ‘the_content’, ‘narga_excerpts’ ); remove_filter( ‘the_content’, ‘remove_first_image’ ); while ( have_posts() ) { … Read more

conditional tags for the output of a plugin

You code is not wrong, probably the only problem is that you are using is_home() when you need is_front_page. However, just for a tip, I want show how your code can be semplified a lot: class donor_pdf_plugin extends WP_Widget { static $fields = array(); // Constructor function donor_pdf_plugin() { self::$fields = array( ‘link’ => __(‘Menu … Read more