Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #911782

    Hi there,

    I want a static image on all 5 sliders I have created and found this code:

    add_filter('ava_after_main_container', 'ava_after_main_container_mod', 20, 1);
    function ava_after_main_container_mod() {
    	 $output  = "<div class='static-content'>";
       $output .= "<h3>Custom Title</h3>";
       $output .= "</div>";
    
       echo $output;
    }

    Can you give me the code with an output for an image or do you have a better solution? The logo option in layer slider is increasing the image and makes the image blurry.

    #912087

    Hey ponchovogel,

    Thank you for using Enfold.

    Please use this code instead.

    add_action('ava_after_main_container', 'ava_after_main_container_mod', 20, 1);
    function ava_after_main_container_mod() {
       $output  = "
    <div class='static-content'>";
       $output .= "<img src='IMAGE URL HERE' />";
       $output .= "</div>
    ";
       echo $output;
    }

    Adjust the image url. It may require additional css modifications. Provide a link to the site after adding the filter.

    Best regards,
    Ismael

    #912249

    Hi Ismael,

    thanks for the code. I only forgot to ask if its possible to link the image to an other page.and hope you can help me with this code.

    #912479

    Hi,

    yes, convert the code as

    add_action('ava_after_main_container', 'ava_after_main_container_mod', 20, 1);
    function ava_after_main_container_mod() {
    $url = 'http://yoururlhere.com';
       $output  = "
    <div class='static-content'>";
       $output .= "<a href="'.$url.'"><img src='IMAGE URL HERE' /></a>";
       $output .= "</div>
    ";
       echo $output;
    }

    and add to the $url the link you want

    Best regards,
    Basilis

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.