WordPress.org

Forums

WP Publication Archive
[resolved] Disable Link in Title (5 posts)

  1. julian.haidner@gmail.com
    Member
    Posted 1 year ago #

    Hi to all. I really like this plugin as it perfectly suits my needs. Actually im just in need of the archive to display publications. So i would like to know what i have to do to not have the Title of the publication in the archive a link? Is there a simple way of disabling this functionality? If so please

    http://wordpress.org/plugins/wp-publication-archive/

  2. schaet
    Member
    Posted 1 year ago #

    Anyone have a solution for this? I'm in the same boat ...

  3. jspada
    Member
    Posted 1 year ago #

    I too need this. I just want the list of publications to have the 'View' & 'Download' links and not have the title link to a single page view.

    I have found that I can create a template.wppa_publication_list.php file in my theme and modify how the shortcode outputs the list of publications but the title is wrapped in a link to the permalink to that publication.

    I have also found the wpa-title filter but it too seems to only filter the text of the title and not the whole title output which includes the link markup.

    Has anyone managed to figure this out before?

    Any assistance would be greatly appreciated.

    Thank you.

  4. jspada
    Member
    Posted 1 year ago #

    Ive continued to work on this on my own. Im surprised that more people havent been looking for a solution to this. Here is a solution that I worked out that works for me.

    In your template.wppa_publication_list.php file in your theme, replace:

    <?php $pub->the_title(); ?>

    with:

    <?php ob_start();
    var_export($pub->the_title(), true);
    $nolinktitle = ob_get_clean();
    echo strip_tags($nolinktitle, '<div>'); ?>

    This captures the output of $pub->the_title, turns it to a string, and then strips all html tags, in our case the anchor link, and leaves div tags so we can keep the <div class="publication_title"> container.

    Hope this helps someone.

  5. Eric Mann
    Member
    Plugin Author

    Posted 1 year ago #

    @jspada, that's exactly how to address this. The template.wppa_publication_list.php file bundled with the plugin is the default. If you need to modify the output, copy this file to your theme and edit to your heart's delight.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Publication Archive
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.