Use full size images in a specific gallery
The gallery shortcode accepts a size parameter: This will select the full size image. For the URLs see this answer.
The gallery shortcode accepts a size parameter: This will select the full size image. For the URLs see this answer.
The pattern I use is: break code into modules using classes use spl_autoload_register() to load classes (thereby only included when used) have a class that is the plugin controller, with a method for each shortcode those methods generally do nothing but create instance of shortcode class and pass params Works for me, simplifies things greatly, … Read more
Here’s the code to be added to functions.php. As a bonus I’ve included a shortcode for a horizontal rule <hr>: function shortcode_hr() { return ‘<hr>’; } function shortcode_clearfix() { return ‘<div style=”display: block; visibility: hidden; clear: both; height: 0;”></div>’; } function register_shortcodes() { add_shortcode(‘hr’, ‘shortcode_hr’); add_shortcode(‘clearfix’, ‘shortcode_clearfix’); } add_action( ‘init’, ‘register_shortcodes’); Nothing complicated here, so … Read more
With both Nextgen Gallery and Nextgen-Galleryview active, the shortcode [nggallery id=1 template=”galleryview”] should work with 1 being your gallery ID.
This is the function I use, maybe there is a better way. $attachments = get_children( array( ‘numberposts’ => -1, ‘order’=> ‘ASC’, ‘post_mime_type’ => ‘image’, ‘post_parent’ => get_the_ID(), ‘post_type’ => ‘attachment’ )); $first_attachment = reset($attachments); //$last_attachment = end($attachments); or last image echo wp_get_attachment_image($first_attachment->ID, ‘full’); Additional wp_get_attachment_image parameters found here: http://codex.wordpress.org/Function_Reference/wp_get_attachment_image
it looks like you have extra spaces in your shortcodes. Try [loggedin] [info_box type=”setting”]content text[/info_box] [/loggedin] instead of [loggedin] [ info_box type=”setting” ]content text[ /info_box] [/loggedin]
To put shortcode within a PHP template, use do_shortcode(); <?php echo do_shortcode( ‘[like_to_read]The text that is hidden from the user.[/like_to_read]’ ); ?> Edit: <?php echo do_shortcode( ‘[like_to_read]’ . get_the_content() . ‘[/like_to_read]’ ); ?>
Browsing through the code at http://core.trac.wordpress.org/, it appears that the file you’re looking for is /wp-includes/media.php. I wouldn’t recommend editing core files, though; any updates you make would be clobbered in the next upgrade.
How about using a ternary operator? if ($immopress_property[‘assistedLiving’]): ?> <li class=”assistedLiving”> <span class=”attribute” style=”width:200px;display:block;float:left;”><?php echo ‘Seniorengerechtes Wohnen’ ; ?><span class=”wpp_colon”>:</span></span> <span class=”value”><?php echo get_post_meta($post->ID, ‘assistedLiving’ , true) ? ‘Ja’ : ‘Nein’; ?> </span> </li> <?php wp_reset_query(); ?> <?php endif; ?> Also, please, keep your presentation separate from your content by not using inline styles.
I was able to resolve this by moving ‘infographic’ to the front of the list in the $in[‘plugins’] string