Jump to content

Search the Community

Showing results for tags 'links'.

More search options

  • 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 (Dreamweaver, Zend, 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. Say I have directory setup like this. core/ includes/ snippets/ template.php js/ index.php Say in the index.php file, I have a file path like this " include 'snippets/template.php'; ". It works. Or say If I am in template.php and I have a file path like this " include '../index.php'; ". It works as well. I am wondering if there is a more global method to this so I don't have to worry about when to use "../" or not. It becomes hectic if there are a lot of includes and/or links.
  2. Hello - I hope I explain this clearly... I have some php code that presently displays 4 boxes in a row with images. When you click on a box/image, you go to a web post. The code goes to the bottom, sets the link, then loops back for the next image and repeats the process. What I'm trying to do is break this code apart so that that I can make each image go to a different link - basically set it up as html - image with link to a page. ( 4 of these) However, I don't want to break the code or the page that it displays ( our home page ) Here's the code snippet: <div id="new-classes" class="carousel slide"> <!-- Wrapper for slides ufff--> <div class="carousel-inner"> <?php $pieces=array_chunk($gallery,4); $j=0; foreach ($pieces as $slice) { echo '<div class="item '; if($j==0){echo 'active';} echo '">'; foreach ($slice as $i => $conte) { ?> <div class="col-sm-6 col-md-3" > <div class="new-class" > <img src="<?php echo $slice[$i]['image']; ?>" alt="//" /> <div class="class-title" > <div class="occult" > TEST this is where the specialities boxes link is <a <?php echo colors('a');?> href="<?php echo $slice[$i]['link']; ?>" class="link" ></a> I duplicated the above line and put in a specific link but it makes all the images go to the same page <a <?php echo colors('a');?> href="https://www.absolutept.com/tendinopathy/" class="link" ></a> --> </div> <h3 <?php echo colors('h3');?>><?php echo $slice[$i]['title']; ?></h3> <p <?php echo colors('p');?> class="occult" ><?php echo wp_trim_words(insert_br($slice[$i]['desc']),10,'...'); ?></p> </div> </div> </div> <?php } //end slice echo '</div>'; $j++; } // end pieces ?> </div> our homepage is absolutept.com -- these images are the "specialties" section 3/4 of the way down In the theme( wordpress) - there's an option to enter specialties ( custom post type ) which we did but we don't want these links to go to those special posts, we want them to go to the pages that the user can find in the main menu I know this is breaking the set up of the theme but if it's doable, we'd like to try First - any idea if it's doable and if so, thoughts on how? =) Thanks in advance.
  • 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.