• I have a section on my sidebar called “Event and Announcements” where I have a list of links to new event pages using wp_list_bookmarks. (I create links to the pages I want under a specific link category. The way it’s supposed to look on the site is like this:

    Event C
    This is the description for a specific event or announcement.
    see more…

    Event B
    This is the description for a specific event or announcement.
    see more…

    Event A
    This is the description for a specific event or announcement.
    see more…

    In addition to each “Event #” title linking to the appropriate page, the “see more…” is also link to the respective page. However, I’m having trouble getting the “see more” link to actually retrieve the required link.

    This is my current relative code:
    <?php wp_list_bookmarks('after=<a href="<?php the_permalink(); ?>">permalink</a>'); ?>

    I tried using get_permalink, the_permalink, post_permalink, etc. Instead of the actual link, they all end up outputing the following broken HTML link:
    <a href="https://www.pinstripepresentations.com/artsvest_wp/<?php the_permalink(); ?>">see more...</a>

    Anyone know if this even possible?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m not sure if what you are trying to do is possible, I’ll defer that to an expert.

    I do see an issue with the code you are trying to use…. you can put that php inside of a php….that doesn’t work…. when I’m trying to use get_permalink inside of an already open php call, it’s like this…. maybe this will get you started while we wait?

    echo "<a href='" . get_permalink() . "'>

    Thread Starter beans_etc

    (@beans_etc)

    Thanks for the tip. I’m not very PHP savvy. However, when I try to insert that code snippit you gave me and load the page, it gives me an error: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING Do I have the syntax wrong…? I wasn’t sure whether/where to include closing quotations, etc…

    <?php wp_list_bookmarks('after=echo "<a href='" . get_permalink() . "'>permalink</a>'); ?>

    ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Possible to retrieve permalinks within wp_list_bookmarks?’ is closed to new replies.