Forum Replies Created

Viewing 15 replies - 16 through 30 (of 66 total)
  • Thread Starter reypm

    (@reypm)

    Nope, I’ve tried the code in functions.php in a child theme and I got a blank page, I ask for support on theme page and they didn’t support this kind of changes on theme so I am on my own. Did you have any ideas on why I got the blank page? I have debug enabled and I get nothing on that file when this happen

    Thread Starter reypm

    (@reypm)

    Ok, but code as I have looks fine to you? Have sense as I made it? Yes I will use Regenerate Thumbnails plugin in order to get oldest image regenerate using the new add-meta-tags-size size

    Thread Starter reypm

    (@reypm)

    Hi George, in fact I will need a push up from your side since as I said earlier I am not a WordPress expert so, in a child theme I have create a functions.php file and I have added this code:

    add_action('after_setup_theme', 'us_theme_setup');
    function us_theme_setup()
    {
        add_image_size('add-meta-tags-size', 100, 120, true); // (cropped)
    }
    
    function amt_use_full_image_size_in_all_meta_tags($size)
    {
        return 'add-meta-tags-size';
    }
    
    add_filter('amt_image_size_index', 'amt_use_full_image_size_in_all_meta_tags', 10, 1);
    add_filter('amt_image_size_content', 'amt_use_full_image_size_in_all_meta_tags', 10, 1);
    add_filter('amt_image_size_attachment', 'amt_use_full_image_size_in_all_meta_tags', 10, 1);

    How I should use the new image-size on the code you provide me related to Add-Meta-Tags plugin?

    Thread Starter reypm

    (@reypm)

    Thx George, that are really good news, I am not an WordPress expert and have a lot to learn but know PHP and OOP and others like Symfony2, Laravel and so on so if you need my help in something just feel free to ping me.

    Now regarding the new feature I come with another suggestion for you and I would try this before do anything else – meaning add new code. As you can see in this post at SO I have got a reply related to no display images at Google+ post: http://stackoverflow.com/a/31350004/719427 take a look to it, is something related to featured image size.

    What comes to my mind if to add a filter for crop images before set them as og:image and perhaps this will solve the issue. If you tell me how, I can try and see if that works, otherwise I will need to wait until you can

    Again, thx for your support is amazing

    Thread Starter reypm

    (@reypm)

    Thx for your answers 😉

    This

    2) Enter the featured image’s URL to the “Global image override” field.

    is per image or it is general for the whole blog? If it is for the blog will not works since it will overrides all post images and I don’t want that either

    Thread Starter reypm

    (@reypm)

    Yes, it is more clear plugin not works as I need and want as far as I can see from your explanation above so I am asking for a modification from your side or mine – through a function or some code or hook or something else if it’s possible of course.

    Suppose you or anyone has a post with several images plus the featured image, by default the plugin add a og:image tag for each image on that post, right?

    If I set “Global image override” in config then plugin will omit all the images on the post and use the one configured at that field, right?

    Ok, what I need and I am proposing is:

    – if I do not choose and setup “Global image override” then use just the featured image and set og:image with that attribute – do not add a og:image attribute for each image on the post just one for the featured one

    – if post miss featured image then you can write something to put a default image – I think this is the same than “Global image override” but without need to mark that option and also not working in the same way as you have now

    Did you get my concerns and points?

    Thread Starter reypm

    (@reypm)

    Perhaps I am not following you at all, you said the plugin will use featured image by default and having “Global image override” with some URL will omit the rest of og:image tags?

    Thread Starter reypm

    (@reypm)

    I think that answer doesn’t fix my issue at all. I need to set og:image to use featured image and only this image, if there is not featured image for the post then will use the default page logo or any other image that users will be able to upload, that will be awesome, can you do that or tell me how to achieve this?

    Thread Starter reypm

    (@reypm)

    Thx it works

    Thread Starter reypm

    (@reypm)

    Thanks @tom I was missing that third level and thx @landonbotis the way that you show me probably works too

    Thread Starter reypm

    (@reypm)

    I have that covered but I don’t know how to organize items and set headers as image from original sources shown. Here is what I get in my menu

    Thread Starter reypm

    (@reypm)

    My bad @tom, yes with latest release all is working fine for me

    Thread Starter reypm

    (@reypm)

    Thanks I read the docs and add the OR at meta_query and things works:

    'meta_query' => array(
       'relation' => 'OR',
       array(
           'key'     => '_custom_blog_enhome',
           'value'   => '1',
           'compare' => '='
       ),
       array(
          'key'     => 'cpt_opinion_show_at_home',
          'value'   => 1,
       )
    )
    Thread Starter reypm

    (@reypm)

    Yes, this is what I need but if I add:

    array(
        'key'     => 'cpt_opinion_show_at_home',
        'value'   => 1,
    )

    The WP_Query returns 0 rows, why is that?

    Thread Starter reypm

    (@reypm)

    Ohhh nice but later you mean today or other day? I need this as soon as you can, any ETA?

Viewing 15 replies - 16 through 30 (of 66 total)