Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author RealMag777

    (@realmag777)

    Hello. You can use this wp function:
    $content = get_post_field(‘post_content’, $post_id);

    then

    $content=substr ($content, 0, 200);
    200 is count of symbols
    echo $content;

    Plugin Author RealMag777

    (@realmag777)

    Or another code:
    https://c2n.me/3butA3f.png

    <?php if (!defined('ABSPATH')) die('No direct access allowed'); ?>
    <?php
    
    wp_enqueue_style('my_prospects', get_template_directory_uri() . '/mdf_templates/any/my_prospects/css/styles.css');
    global $mdf_loop;
    MDTF_SORT_PANEL::mdtf_catalog_ordering();
    
    ?>
    <?php
    
    while ($mdf_loop->have_posts()) : $mdf_loop->the_post();
        ?>
        <?php echo do_shortcode('[mdf_post_features_panel]'); ?>
        <?php get_template_part('content', ''); ?>
    <?php endwhile; // end of the loop.     ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add post content to search result’ is closed to new replies.