I am trying to build a function, which gives out different image-urls, according to the last digit of bbp_get_topic_id()
.
This is, what i’ve got so far:
function bg_image_topic_titlearea() {
$letztezifferimgs = substr("'.bbp_get_topic_id().'", -1);
switch ($letztezifferimgs) {
case "0":
echo "https://test.bewusstewelt.de/wp-content/uploads/2016/10/Blockaden-lösen-2.jpg";
break;
case "1":
echo "https://test.bewusstewelt.de/wp-content/uploads/2016/09/Das-Leben-ist-ein-Spiel-2.jpg";
break;
case "2":
echo "https://test.bewusstewelt.de/wp-content/uploads/2017/02/Bedürfnisse-erkennen-3.jpg";
break;
case "3":
echo "https://test.bewusstewelt.de/wp-content/uploads/2016/08/Selbsterkenntnis-sich-selbst-finden2-1.jpg";
break;
case "4":
echo "https://test.bewusstewelt.de/wp-content/uploads/2016/11/Reinkarnation-Wiedergeburt-2.jpg";
break;
case "5":
echo "https://test.bewusstewelt.de/wp-content/uploads/2016/10/Intuition3.jpg";
break;
case "6":
echo "https://test.bewusstewelt.de/wp-content/uploads/2016/07/Manchmal-muss-man-loslassen-3.jpg";
break;
case "7":
echo "https://test.bewusstewelt.de/wp-content/uploads/2016/07/Manchmal-muss-man-loslassen-3.jpg";
break;
case "8":
echo "https://test.bewusstewelt.de/wp-content/uploads/2017/02/Pfad.jpg";
break;
case "9":
echo "https://test.bewusstewelt.de/wp-content/uploads/2017/01/Zirbeldrüse-aktivieren-2.jpg";
break;
}
}
Yet it does not react, if i use .bg_image_topic_titlearea().
to get the image url.
I am trying to get it done for some time now and i would be glad, if someone could help me.
Kind regards
Dominik