If you want to create a custom functionality in your Joomla site related to the articles and you have to get the article details by using article ID, then keep your close attention in this post as I am going share how to get the article by article ID in Joomla 3.
Copy the below code snippet and use it in any Joomla template file.
* Get article by article ID
$db = &JFactory::getDBO();
$sql = "SELECT introtext FROM #__content WHERE id = ".intval($articleId);
$fullArticle = $db->loadResult();
$fullArticle = "Article is empty";
Liked this program? Do Like & share with your friends.
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.