Converting html to wordpress images not showing

In your comments you mentioned that you are still new to wordpress, and I believe you don’t have a full understanding of the template hierarchy. Essentially, wordpress looks for certain templates depending on what post type is being displayed. And if it can’t find any, the last resort is always the index.php file. Here is … Read more

Add custom setting that uses radio button to WP Gallery

I had the same problem and got it finally to work. Based on the thread you have followed, you now have to extend the “update” function of the WP core /wp-includes/js/media-views.js. Go to the “jQuery(document).ready(function()…” part of the ‘print_media_templates’ action and try this: <script> jQuery(document).ready(function() { wp.media.view.Settings.Gallery = wp.media.view.Settings.Gallery.extend({ // add your custom options template … Read more

Target WooCommerce Product Gallery Image (rather than Featured Image) for og:image

You will need to use the methods on one of the WooCommerce product object for example: function insert_fb_in_head() { global $post; if ( !is_singular()) //if it is not a post or a page return; echo ‘<meta property=”og:title” content=”‘ . get_the_title() . ‘”/>’; echo ‘<meta property=”og:type” content=”article”/>’; echo ‘<meta property=”og:url” content=”‘ . get_permalink() . ‘”/>’; echo … Read more

Display gallery on top before content

function gallery_first( $content) { $expr=”/\[gallery(.*?)\]/i”; return preg_replace_callback( $expr, create_function(‘$matches’, ‘return do_shortcode($matches[0]);’), $content); } add_filter( ‘the_content’, ‘gallery_first’, 6); // prio 6 executes this function previous to all other filter functions

Gallery post images on homepage?

You could use this loop for fetching the images from current post. <?php $images = get_posts(array( ‘post_parent’ => get_the_ID(), ‘post_type’ => ‘attachment’, ‘posts_per_page’ => 5, ‘post_mime_type’ => ‘image’ )); if( $image ) { foreach($images as $image) : echo wp_get_attachment_link( $image->ID, ‘thumbnail-size’, true ); endforeach; } ?> reference: wp_get_attachment_link wp_get_attachment_image

GalleryView binding for WP Gallery, without NextGen

I’m afraid there’s no plugin, but using jQuery GalleryView is not that hard actually. Download Download jQuery GalleryView and put the css and js folders inside a new folder galleryview in your theme’s folder. Setting Up the List jQuery GalleryView needs an unordered list so we have to alter the gallery output: add_filter( ‘post_gallery’, ‘my_post_gallery’, … Read more

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