Note that there are some explanatory texts on larger screens.

plurals
  1. POWordpress 3.5: own gallery with included images doesn't work
    primarykey
    data
    text
    <p>I just updated to Wordpress 3.5, but this crashed a little part of my code: There is a php file, which loads a specific post with its gallery via AJAX.</p> <p>The code looks like:</p> <pre><code>&lt;?php // Include WordPress define('WP_USE_THEMES', false); require('../../../../wp-load.php'); $id = $_POST['id']; // query post with this identifier query_posts('meta_key=identifier&amp;meta_value='.$id); if (have_posts()) : while (have_posts()) : the_post(); // add content $content = apply_filters('the_content', get_the_content()); echo '&lt;div class="content-inner"&gt;'.$content.'&lt;/div&gt;'; endwhile; endif; ?&gt; </code></pre> <p>The post contains a [gallery] shortcode. I've build my own Wordpress gallery with this code:</p> <pre><code>remove_shortcode('gallery'); add_shortcode('gallery', 'parse_gallery_shortcode'); function parse_gallery_shortcode($atts) { global $post; extract(shortcode_atts(array( 'orderby' =&gt; 'menu_order ASC, ID ASC', 'id' =&gt; $post-&gt;ID, 'itemtag' =&gt; 'dl', 'icontag' =&gt; 'dt', 'captiontag' =&gt; 'dd', 'columns' =&gt; 3, 'size' =&gt; 'full', 'link' =&gt; 'file' ), $atts)); $args = array( 'post_type' =&gt; 'attachment', 'post_parent' =&gt; $id, 'numberposts' =&gt; -1, 'orderby' =&gt; $orderby ); $images = get_posts($args); print_r($images); } </code></pre> <p>This works with all other galleries on my site, but not with the ajax-loaded ones. And it has worked with Wordpress 3.4. </p> <p>Are there changes in Wordpress 3.5 that I've overlooked?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload