• Resolved hb82

    (@hb82)


    Hello, is it possible to add html in excerpt when using post grid? or maybe some code in functions.php that can make this work?
    Thanks for this great plugin ??

    • This topic was modified 6 years, 2 months ago by hb82.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Vrunda

    (@vrundakansara-1)

    Hey,

    Currently, one can not do that. But we will surely add this in our upcoming release next week.

    We will provide action hooks so that you can add HTML from theme’s functions.php fie.

    We appreciate you for bringing this to us.

    Regards,
    Vrunda Kansara

    Thread Starter hb82

    (@hb82)

    Great, thanks Vrunda ??

    Plugin Author Vrunda

    (@vrundakansara-1)

    Hey,

    We have updated UAGB to v1.8.0. You can add HTML before/after the excerpt for Post Grid using the below action hooks. You need to add the below-given code to your child theme’s functions.php file.

    add_action(
    	'uagb_single_post_before_excerpt_grid',
    	function (  $post_id, $attributes ) {
    		echo '<p>I love UAGB</p>';
    		// Here you can fetch any HTML as per the post.
    	},
    	10,
    	2
    );

    If you need the HTML after the excerpt you need to change uagb_single_post_before_excerpt_grid to uagb_single_post_after_excerpt_grid.

    I hope this resolves your doubts.

    Note: This will work only at frontend.

    Regards,
    Vrunda Kansara

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘post grid html in excerpt’ is closed to new replies.