Viewing 4 replies - 1 through 4 (of 4 total)
  • i was unable to get the table elements to work but have styled the “list” as a table

    <img src=”https://www.clipular.com/c/4739934452711424.png?k=qRQALhU_UCQIDIVHm3A3zaYmGKg”&gt;

    Thread Starter John

    (@dv1961)

    Thanks for that showcase.

    I’ve managed to a basic table to work, here’s the code:

    //Add 'starting' tag. Here, I'm using an unordered list (ul) as an example:
    $lcp_display_output .= '<table class="lcp_catlist">';
    
    foreach ($this->catlist->get_categories_posts() as $single){
      //Start a List Item for each post:
      $lcp_display_output .= "<tr>";
    
      //Show the title and link to the post:
      $lcp_display_output .= $this->get_post_title($single, 'td', 'lcp_post');
    
       //Show date:
      $lcp_display_output .= ' ' . $this->get_date($single, 'td', 'lcp_post'); 
    
       //Post Thumbnail
      $lcp_display_output .= $this->get_thumbnail($single);
    
       //Close li tag
      $lcp_display_output .= '</tr>';
    }
    
    // Close the wrapper I opened at the beginning:
    $lcp_display_output .= '</table>';

    That’s all fine, but how to I create a table head?

    @dv1961

    Did you manage to create a table head?

    Thread Starter John

    (@dv1961)

    No, I gave up and switched to Custom Content Shortcode plugin, it does everything I need and more

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display as table’ is closed to new replies.