Where can I insert (in the php) this code to change the image to a slider? <?php putRevSlider("slider1") ?> but instead of "slider1" there has to be a get post id.
Thats true. I will call the post ID. The RevSlider supports - in this case - only the name of a slider. But if I use a a name in the single.php it will call the same slider on each post. So I try to get the post ID to give each slider different ID (name) so that it calls the slider with the same "name" like the post-id. So I have to rename each slider exact like the post ID to show the right one.
But in my code it shows me a php error. And I have no detailed knowhow in php to get this done.
Sorry, can't help you with that(your code is wrong btw, you are embeding PHP tags wrong way). However you can do trick. In Screen options enable Custom Fields and do something like that:
Comments
File single.php line ~28, replace
<?php a13_top_image_video(); ?>
with your code for slider.With kind regards.
<?php putRevSlider("<?php the_ID(); ?>") ?>
With kind regards.
The RevSlider supports - in this case - only the name of a slider. But if I use a a name in the single.php it will call the same slider on each post. So I try to get the post ID to give each slider different ID (name) so that it calls the slider with the same "name" like the post-id. So I have to rename each slider exact like the post ID to show the right one.
But in my code it shows me a php error. And I have no detailed knowhow in php to get this done.
Next read value of this field as explained here https://codex.wordpress.org/Using_Custom_Fields
So you Will have something like that:
<?php putRevSlider( get_post_meta(get_the_ID(), 'slider_id', true) ) ?>
With kind regards.
For those who are interested here is the code: