• Resolved mrenrich

    (@mrenrich)


    Hi, I am using PHP function in_category() to show posts through the post grid plugin, for example I am reading post id 1, at the end of the post I did put a new grid about related posts of a given category.
    Is it possible to exclude the current post ID ?

    <?php if(in_category('27')){ ?><?php echo do_shortcode( '[the-post-grid id="560" title="inside_post"]' ) ?><?php }?>

    I thought i could extract ID post before but how to get it works within the post grid ?

    Thanks

    https://ww.wp.xz.cn/plugins/the-post-grid/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author RadiusTheme

    (@techlabpro1)

    Hello,

    For this you need custom query and css. I think it will not work but you can try custom query.

    Thanks

    Thread Starter mrenrich

    (@mrenrich)

    I can try…but the main problem is to mix it with your shortcode.

    Any help?

    Plugin Author RadiusTheme

    (@techlabpro1)

    Hello,
    My plugin coding structure in object oriented I think using this code you can not show others post.

    Better you can code your own Query and to display can use my coding structure then you get same look as my plugin.

    I can send you the query if you want?

    Thanks

    Plugin Author RadiusTheme

    (@techlabpro1)

    Hi,

    I am closing this topic. If need any more help please let me know.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘dinamically excluding current post’ is closed to new replies.