Jump to content

Search the Community

Showing results for tags 'image slider'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 2 results

  1. Hi - can anyone help? I'm new to PHP land, and failing at this particular part. I have an image slider - where each image is contained in a div (e.g it is not a slider using ul and il...) It is will be used in a template for many pages, which will each have a varying number of images. There for I need to create a loop that say 'when there is no img url found, return to img 1' I'm stump. Currently this is beyond me ..... Or do I need to start from scratch? (ARGH!) Here is my function function getImage($num) { global $more; $more = 1; $link = get_permalink(); $content = get_the_content(); $count = substr_count($content, '<img'); $start = 0; for($i=1;$i<=$count;$i++) { $imgBeg = strpos($content, '<img', $start); $post = substr($content, $imgBeg); $imgEnd = strpos($post, '>'); $postOutput = substr($post, 0, $imgEnd+1); $postOutput = preg_replace('/width="([0-9]*)" height="([0-9]*)"/', '',$postOutput);; $image[$i] = $postOutput; $start=$imgBeg+$imgEnd+1; } if(stristr($image[$num],'<img')) { echo '<a href="'.$link.'">'.$image[$num]."</a>"; } $more = 0; } and here's how I use it in the html: <div class="project-slider-mask w-slider-mask"> <div class="w-slide"> <?php getImage('1'); ?> </div> <div class="w-slide"> <?php getImage('2'); ?> </div> <div class="w-slide"> <?php getImage('3'); ?> </div> <div class="w-slide"> <?php getImage('4'); ?> </div> etc etc etc Help much much appreciated....been failing at this for so long!
  2. Hello, I am using this theme on a site build. I would like to replace the static header image with the Slidedeck 2 Pro, image slider. Their code provided for placing into the header is below. <?php echo do_shortcode( '[SlideDeck2 id=XXXX iframe=1]' ); ?> The pertinent part of my theme's header code is as follows: <div id="header-wrapper"> <div id="header"> <div class="container"> <a href="<?php bloginfo('url'); ?>"><?php $logo = (get_option('myproduct_logo') <> '') ? get_option('myproduct_logo') : get_bloginfo('template_directory').'/images/top-bg.jpg'; ?> <img src="<?php echo esc_url($logo); ?>" alt="<?php echo esc_attr(get_bloginfo('name')); ?>" id="logo"/></a> I have also attached the complete header file. header.php Any help on this would be greatly appreciated, as I am a noob, and do not have the knowledge to perform this task. Thank You, Paul
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.