Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter clubirv

    (@clubirv)

    Thanks so much for your quick response! Glad my walkthrough was helpful. Great plugin!

    Thread Starter clubirv

    (@clubirv)

    That works! Thank you so much!

    Thread Starter clubirv

    (@clubirv)

    UPDATE:
    Okay. I now roughly know why the problem was occurring.

    My posts use RoyalSlider* to display a custom image gallery. For a couple of reasons, I was using jquery to ‘move’ image captions from one div into the main caption container div after each slide change:

    slider.ev.on(‘rsAfterSlideChange’, function(event) {
    $(‘._19’).html($(‘#_19’).html());
    });

    The AddToAny code was moving to the new div without the information that was rendered in the original div. I have no idea why this is/was the case?

    Anyway, I changed my RoyalSlider markup so that the .html() copying was no longer needed.

    * I am using the regular JQuery version of RoyalSlider and not the RoyalSlider WordPress plugin (due to the custom nature of my site)

    I need this too! I’m using the wpseo_opengraph_image filter in my functions.php (below). The problem is that the og:image:width and og:image:height are defaulting to the featured image even when my opengraph image is NOT the featured image. I need to be able to use a filter to use the actual width and height of the image I’m using with the filter. I’m guessing this still isn’t possible? Or, perhaps I’ve missed new documentation on this despite extensive searching?

    add_filter('wpseo_opengraph_image', 'wpseo_change_image' );

    function wpseo_change_image($thumbnail) {
        global $wp_query;
        if (isset($wp_query->query_vars['image'])) {
            $imgvar = trim(explode('/', $wp_query->query_vars['image'])[0]);
            $attachment_meta = wp_get_attachment($imgvar);
            $thumbnail = $attachment_meta['src'];
        } elseif (isset($thumbnail)) {
            return $thumbnail;
        } else {
            $thePost = get_post();
            $images = get_field('gallery');
            $image  = $images[0];
            if ($image) {
                $thumbnail = $image['sizes']['large'];;
            }
        }
        return $thumbnail;
    }

    @allwi: Did you figure anything out?

    I am having the same problem and it has been driving me crazy!

    This is what I have in my functions.php for rewriting: http://pastebin.com/yKAfvJTL
    It allows me to include a numeric value at the end of regular posts, pages, and my custom posts (slug: work). Just can’t get the tag value.

Viewing 5 replies - 1 through 5 (of 5 total)