• I’ve tried two methods to add a link list category within the footer.php, however my code breaks the site.

    <?php //echo $my_link_library_plugin->LinkLibraryCategories(‘name’, 1, 100, 3, 1, 0, ”, ”, ”, false, ”, ”); ?>
    <br />
    <?php //echo $my_link_library_plugin->LinkLibrary(‘name’, 1, 1, 1, 1, 0, 0, ”, 0, 0, 1, 1, ‘<td>’, ‘</td>’, 1, ”, ‘<tr>’, ‘</tr>’, ‘<td>’, ‘</td>’, 1, ‘<td>’, ‘</td>’, 1, “Application”, “Description”, “Similar to”, 1, ”, ”, ”, false, ‘linklistcatname’, false, 0, null, null, null, false, false, false, false, ”, ”); ?>
    
    	
    		<center> --------- <?php //echo do_shortcode("[link-library settings="1" excludecategoryoverride="63"]"); ?> ------------- </center>

    I’m not a php coder. Maybe someone could be so nice as to what am I doing wrong? Thanks!

Viewing 1 replies (of 1 total)
  • Plugin Author Yannick Lefebvre

    (@jackdewey)

    How does your code break the site? White screen of death? Or does it mess up the footer layout due to unmatched tags?

    The second method with the do_shortcode method is definitely the recommended one compared to the first one. Actually, even easier would be to use the Link Library widget in a footer widget section. That would allow you to add the widget without modifying any of your site code.

    Actually, if you do need to do it through code, and looking at the code within the do_shortcode function, I notice that you used double-quote at the beginning of your shortcode string AND for the shortcode parameters. That will definitely mess up the parser. You should change one of the sets of quote to single quotes, like I did below.

    <?php //echo do_shortcode('[link-library settings="1" excludecategoryoverride="63"]'); ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Add Category List To footer.php’ is closed to new replies.