I need to insert image banners into my WP single site installation

Hello, i'm developing the following website http://fullnews.gr and i want to insert horizontal image banners between the header and main content, exactly bellow the breaking news bar.
I've trying insertign the following code from a plugin <?php if( class_exists( 'LenSlider' ) ) {LenSlider::lenslider_output_slider( '5f719e4522' );}?> inside the header.php and page.php and index.php files on various positions but it didnt worked.
Can you tell me where to to insert this line of code and in what file? I'm checking the theme's files but havent found it yet..
Here is the page.php code http://pastebin.com/yEp4aKy2

Here is the index.php code
http://pastebin.com/kHVz7c3Y

And here is the header.php code
http://pastebin.com/p5dZWjNs

Can you help me where to insert my code?
Thank you in advance!

  • Tyler Postle

    Hey Theodor,

    Hope you're doing well today!

    That code is saying that if the lenslider class exists then output the slider, so I'm wondering if maybe the LenSlider class doesn't exist, because it should be outputting it somewhere when you place it in the file.

    You could also try just using the shortcode method too:

    <?php echo do_shortcode('[lenslider id="SLIDER_HASH"]'); ?>

    Your theme is a premium one so I don't have access to test it out myself, would you mind sending in your FTP and WP login? Then I can get the slider implemented in the right spot for you :slight_smile:

    Send in:

    Subject: "Attn: Tyler Postle"
    -WordPress admin username
    -WordPress admin password
    -login url
    -FTP credentials (host/username/password)
    -link back to this thread for reference
    -any other relevant urls

    Select "I have a different question" for your topic - this and the subject line ensure that it gets assigned to me :slight_smile:

    https://premium.wpmudev.org/contact/

    Also, keep in mind that LenSlider hasn't been updated in almost 2 years, so you may want to switch to a more up to date slider to avoid any future incompatibilities :slight_smile: such as this one: https://wordpress.org/plugins/ml-slider/

    Hope this helps! Look forward to hearing back.

    All the best,
    Tyler

  • Theodor Dimitriou

    Hello,
    Lenslider plugin is enabled in the website and i really cant find why it isnt showed up. I was moving webservers the last days and thats why i didnt replyied sooner.
    here are the credentials so you can login and help me if you can.
    I just want to display varius sliders 1-2 per time bellow the Header "breaking news".

    [removed for members security]

    Here are all the credentials. I hope you can manage to help me solve this issue.

    Also you will notice that the website takes too much to load..I really have no idea why is this happening and i have done anything in my powers to improve this. If you have any suggestion or idea how to improve this let me know, prior doing any changes for this matter. just to let you know that even with all plugins deactivated the site still takes that much to load, and i have opened ticket in the webhosting company to check this matter but still is under checking..

    Thank you in advance,

  • Tyler Postle

    Hey there Theodor,

    Apologies for my delay here! I've removed your credentials above, our forums are public so you don't want to post them here - sorry I may have not been clear on my above post. For future reference you will want to send them in through our contact form: https://premium.wpmudev.org/contact/

    I tried logging into your FTP account to check this out but it looks like it's pointing to the wrong directory, the only thing in it is a ftpquota file.

    Would you be able to send FTP for the root directory(or even just theme directory) in through our contact form? Then I can test out the theme and get this sorted for you :slight_smile:

    Send in:

    Subject: "Attn: Tyler Postle"
    -WordPress admin username
    -WordPress admin password
    -login url
    -FTP credentials (host/username/password)
    -link back to this thread for reference
    -any other relevant urls

    Select "I have a different question" for your topic - this and the subject line ensure that it gets assigned to me :slight_smile:

    https://premium.wpmudev.org/contact/

    Apologies again here Theodor, I was expecting it to come in through our email, which is a different tracking system than our forums.

    Look forward to hearing back!

    All the best,
    Tyler

  • Theodor Dimitriou

    One last thing which should take much for you i guess.
    I want to have the home page to be like this http://fullnews.gr/category/fullnews/
    if you open 2 tabs side by side you will understant the difference.
    That theme doesnt give's me this feature.
    So i want each time some types fullnews.gr to be redirected at http://fullnews.gr/category/fullnews/
    I've tried redirecting via the DNS settings in cPanel but it caused a mess..
    I've also edited the wp-config.php file but couldnt make it work.
    Can you tell me how to do it? Or solve it by yourself and tell me how you did it so i know for future?
    Sorry for the extra "task"..
    best regards,

  • Tyler Postle

    Hey Theodor,

    Hope you're doing well today! So sorry for the delay. I think I've got this all sorted for you now :slight_smile:

    Since you're redirecting your home page to one of your categories now we need to add the slider code to your category.php file.

    I added this to yours and it seems to have worked:

    <div class="top-slider" ><?php echo do_shortcode('[lenslider id=5f719e4522]'); ?></div>

    I added the "top-slider" class in-case you want to style it.

    I've also commented it out right now so you won't see it. Not sure if the images in the slider is what you want right now so didn't want to display it on the site yet. The code in your category.php will look like this right now:

    <div class="top-slider" ><?php // echo do_shortcode('[lenslider id=5f719e4522]'); ?></div>

    When you are ready to display it, remove the "//" right before "echo" then you should be good to go :slight_smile:

    Let me know if this is how you want it to look. If not, I can re-position it for you.

    Thanks a lot for all your patience!

    Can you tell me how to do it? Or solve it by yourself and tell me how you did it so i know for future?

    You have already got this sorted out right? It seems to be directing to the category page correctly for me. Sorry for not getting back to you sooner!

    Look forward to hearing back.

    All the best,
    Tyler

  • Theodor Dimitriou

    Hello Tyler,
    Thank you very much for your support! As you helped me add this feature to the website i found out what i was doing wrong and couldnt make it myself since it's not that hard. I cant tell you my mistake because it was soooo damn noobish that you would laugh for the hole day. i feel ashamed... :p
    I think i need to step back sometimes, relax and think with a clear mind. Usually i'm working all day everyday and due to that some importand details get unnoticed by me.
    You are very welcome Tyler,
    Thank you again,
    Best regards

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.