Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter spiritedpam

    (@spiritedpam)

    Not really I’m afraid. I need each link to have a different class – hence basing it on their name or id.

    <?php echo get_links('<li class="link_name">'); ?>

    I want something like this ^. Within get_links, link_name is defined as $name but li class=”$name” shows up an error.

    I’m sure I just need to know how to format it correctly. It’s just difficult for me to work out because we are already within double and single quotes and escaping the single quote to put in the variable doesn’t seem to work because it disrupts the function.

    In this scenario; <?php echo get_links('<li class=" how do I put in a variable?

    Thread Starter spiritedpam

    (@spiritedpam)

    Don’t want to bother you all but surely someone knows how to do this, I’m sure it can be done, I just don’t know the way to write it.

Viewing 2 replies - 1 through 2 (of 2 total)