Forums

How to get page content by page ID (2 posts)

  1. eudgen
    Member
    Posted 2 years ago #

    How could I receive page content by ID, if my content include some plugin text, like [googleMap]map[/googleMap], And I need not the text ‘[googleMap]map[/googleMap]‘, but I need google map at my page. Can someone help me?

  2. taraloza_135
    Member
    Posted 1 year ago #

    Hello eudgen,

    I have created my own plugin where I have used the preg_match_replace(), in which if i found [news] as content then it will be automatically replaced by my own display one. Where in match case I have written '\[/news/]\' it should be replaced by my function functionListNews()'s return output.

    And yes for this I have used add_filer('content','checkNewsContent')
    And in this checkNewsContent I have written that logic which is written above.

    I think this should help you more ...

    Best Regards,
    Taral Oza

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags