• Resolved Te Calleja

    (@tecreative)


    Based on this https://github.com/YMC-22/smart-filter?tab=readme-ov-file#layouts

    I put this text in my functions.php file:

    function my_custom_post_layout($layout, $post_id, $filter_id, $increment_post, $arrOptions) {  
    $layout = '<h2>'.get_the_title($post_id).'</h2>';
    $layout .= '<p>Custom text here</p>';
    $layout .= '<a href="'.get_the_permalink($post_id).'">Read More</a>';
    return $layout;
    }
    add_filter('ymc_post_custom_layout_4628_2', 'my_custom_post_layout', 10, 5);

    But the default layout is still showing. I am sure that my FilterID and LayoutID are correct. Am I missing anything?

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

    (@wssoffice21)

    Hi!

    Thanks for using our plugin. First, you should select a custom template (Custom Layout) in the plugin settings Layouts – Post Layout – https://prnt.sc/lq_pt29wLsg0, and then correctly specify the filter ID and its counter on the page. Please provide a link to the page of your site where the filter is located and we will check your filter ID.

    Thread Starter Te Calleja

    (@tecreative)

    Ohhh! Got it, it works. Thank you!!!

    Plugin Author YMC

    (@wssoffice21)

    Good Luck!

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