Answer the question
In order to leave comments, you need to log in
How to replace links in Joomla module using php from external file?
In the widget that displays a feed of the last 6 posts on the Instagram website, it is necessary (as I try) to insert links to these posts using the php code, through the src= and href= attributes, as shown in the screenshot. Since this widget code is built into a dozen sites, when adding new posts to Instagram, changing their url "handles" on each site is quite hemorrhoids) so I want to implement their substitution from ONE .txt or .xls file.
As an option, I tried the above combination with substitution by specifying php variables directly in the code, but it didn’t work out .. plz tell me how it is possible to implement this task?
Answer the question
In order to leave comments, you need to log in
Tried creating an external .php file with an ID for these six insta posts
<?php
return [
'id1' => 'sgsg4t3451',
'id2' => '345341vfdA',
'id3' => 'bfgw12aAvd',
'id4' => 'ByLrLumiMVu',
'id5' => 'ByJFfZ4Hrlp',
'id6' => 'ByGXC_2HshD',
];
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question