• Resolved rebeccamantel

    (@rebeccamantel)


    Hello

    I have the following codes and only the hook ymc_post_custom_layout is not working the other ones are working.

    function my_custom_post_layout($layout, $post_id, $filter_id, $increment_post, $arrOptions) {
    $layout = ”.get_the_title($post_id).’gertretretert’;
    $layout .= ‘

    ‘.wp_trim_words(get_the_content($post_id), 30).”;
    $layout .= ‘Read More‘;
    // $layout .= ‘Open Popup‘;
    return $layout;
    }
    add_filter(‘ymc_post_custom_layout_1050_1’, ‘my_custom_post_layout’, 10, 5);

    // Usage example:
    add_filter(‘ymc_post_date_format_1050_1’, function () {
    return ‘Y-m-d’;
    }, 10, 1);
    // Usage example:
    add_filter(‘ymc_button_show_all_1050_1’, function () {
    return ‘My Alls’;
    }, 10, 1);

    What could be?

    Thank you so much for the amazing plugin!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author YMC

    (@wssoffice21)

    Hi!
    We’ll need to check the filter and counter identifiers on the page. Send us a link to your page so we can check.

    Thread Starter rebeccamantel

    (@rebeccamantel)

    Plugin Author YMC

    (@wssoffice21)

    Try to insert this code. There were incorrect quotes in the syntax. Please check again, insert this code into your theme file functions.php

    function my_custom_post_layout($layout, $post_id, $filter_id, $increment_post, $arrOptions) {
    $layout = get_the_title($post_id). 'gertretretert';
    $layout .= wp_trim_words(get_the_content($post_id), 30);
    $layout .= 'Read More';
    // $layout .= ‘Open Popup‘;
    return $layout;
    }
    add_filter('ymc_post_custom_layout_1050_1', 'my_custom_post_layout', 10, 5);

    Thread Starter rebeccamantel

    (@rebeccamantel)

    Sorry but still not working…

    Plugin Author YMC

    (@wssoffice21)

    Very strange. Check the my_custom_post_layout function call in the functions.php file. Rename the function name to another name, there may be a name conflict somewhere. Clear the cache if necessary. Also check the plugin settings – https://prnt.sc/_qoDWCzPhmtG
    You have the default filter layout enabled – https://prnt.sc/QbymHXj_lgvJ

    Thread Starter rebeccamantel

    (@rebeccamantel)

    The screenshots are not coming up correctly.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.