Assalamualaikum @ghulamjafar2
Have you tried from the code to remove it yet?
can you try it on a test/dev/staging site?
I can send you where you to remove the code. Are you using the full timetable or iqamah/azan only version?
Mustafiz
Thread Starter
gyjafar
(@ghulamjafar2)
No, I did not try to remove it from the code.
Yes, I cat try on test/dev/staging site.
I think that I’m using full timetable. How may I confirm?
Please send the code, I’ll add it by using code snippet plugin.
Thread Starter
gyjafar
(@ghulamjafar2)
I removed these two lines #71 & #123. But it did not make any difference. I’m trying to hide/remove Sunrise section where I’m displaying the timetable by using shortcode [dailytable_horizontal].
oh, it make sense now.
I gave you code to remove it from the monthly timetable.
wait for my next reply …
Please replace this two functions with the following codes:
private function printTableHeading($row)
{
$ths = '';
$nextPrayer = $this->getNextPrayer( $row );
unset($this->localPrayerNames['sunrise']);
foreach ($this->localPrayerNames as $key=>$prayerName) {
$class = $nextPrayer == $key ? 'highlight' : '';
$ths .= "<th class='tableHeading prayerName" . $this->tableClass . " ". $class."'>".$prayerName."</th>";
}
return $ths;
}
private function printAzanTime($row)
{
$tds = '';
$nextPrayer = $this->getNextPrayer( $row );
$azanTimings = $this->getAzanTime( $row );
unset($azanTimings['sunrise']);
foreach ($azanTimings as $key => $azan) {
$class = $nextPrayer == $key ? 'class=highlight' : '';
$rowspan = '';
if ($key == 'sunrise')
{
$rowspan = "rowspan='2'";
}
$tds .= "<td ". $rowspan ." ".$class.">".$this->getFormattedDateForPrayer( $azan, $key )."</th>";
}
return $tds;
}
Thread Starter
gyjafar
(@ghulamjafar2)
I’ll try it. But I have used custom CSS to hide the table heading (th) which shows “Sunrise” and the table data (td) which shows time for sunrise. It worked. I think it is safe for Plugin’s update and not to mess the timetable all over the website as it is specific to this one table only with the ID3. I’m using elementor Pro. Here is my custom CSS sample code:
/*hide sunrise start*/
#hidedateintable3 th:nth-child(3)
{
display:none;
}
#hidedateintable3 tr:nth-child(4)>td:nth-child(3)
{
display:none;
}
/*hide sunrise end*/
Thread Starter
gyjafar
(@ghulamjafar2)
I have replaced both functions in “DailyTimetablePrinter.php” with the new code you wrote above. It’s working perfectly. So now I’ll be removing my temporary CSS trick. JazakAllah
Thread Starter
gyjafar
(@ghulamjafar2)
Assalamualaikum, Brother I noticed that Dhuhr time is never becoming highlighted. Asr becomes highlighted directly after Fajr. I assume that it’s happening as we have removed one column “Sunrise”, while Plugin’s code is considering “Dhuhr” time column as “Sunrise” and skipping it, and adding “highlight” class to “Dhuhr”.
Can you provide any solution please?
JazakAllah