• EDIT: I fixed it. I was using “=” instead of “==” for equals in my if statments.

    I have created a modification of the function get_links (inside “wp-includes/bookmark-template.php”) called get_links_table, that creates a html table and allows the user to modify how many columns it has, and then stores each link from a selected category inside a seperate table data cell.

    the variable, “colnum” is used as a counter to check which column number the loop is currently in. It starts as 0 outside the loop, then at the beginning of the loop, 1 is added to it.

    An if statement then checks if “colnum” equals 1, and starts a new row if true.

    Then, at the end of the loop, colnum is checked against the chosen number of columns (“number_of_columns”). If they are the same, the current row is closed, and colnum is reset to 0.

    Unfortunately, the code isn’t quite working. It seems to be closing the table row on each loop no matter what. This was my first attempt at php coding, so any assistance would be greatly appreciated. Here is the test page: http://www.flagrantlyrandom.com/tv-series-im-watching/
    and here is the code:
    http://www.flagrantlyrandom.com/get_links_table_php_code.txt

    EDIT: I fixed it. I was using “=” instead of “==” for equals in my if statments.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Displaying links on a seperate page inside a html table’ is closed to new replies.