Jump to content

Search the Community

Showing results for tags 'links child loop code help'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. I am trying to create a dynamic loop on my wordpress site, where a parent page generates a column view of links to its sub pages. I have been sucessfull in getting the links to populate with the correct name - $child->post_title - but I can only get the links to open the parent page. I have highlgted the code where i am having issues in red Any assistance anyone can offer would be greatly appreciated. <table class="variety_container"><tr> <?php $child_count=0; echo "<td>"; foreach ($children as $child) { //echo "child count is ". $child_count; $new_col = $child_count > $children_per_col; if ($new_col) { echo "</td><td>"; $child_count=0; } $link = get_page_link( $page->ID + $child ); echo "<a href=$link>" . $child->post_title . "</a>"; echo "<br>"; $child_count++; }?> </tr></table><!--variety container-->
×
×
  • 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.