Hi Joel,
We can look into the possibility of adding an option to include the FAQ title to the permalink link text.
In the meantime, it is possible to modify the template for this in a non-destructive way (doesn’t touch the main plugin code and won’t be overwritten if you update the plugin) and set your own value/text there. We explain in detail how you can do this here:
https://doc.etoilewebdesign.com/plugins/ultimate-faq/developer/
The template you’d be looking for is faq-permalink.php. And you’d want to modify line 5, which is
<?php if ( $this->get_option( 'include-permalink' ) == 'both' or $this->get_option( 'include-permalink' ) == 'text' ) { echo esc_html( $this->get_label( 'label-permalink' ) ); } ?>
The echo esc_html( $this->get_label( 'label-permalink' ) ); part is what outputs the “Permalink” text. You could perhaps get what you want by changing it to something like: echo esc_html( $this->get_label( 'label-permalink' ) ) . ' to ' . esc_html( $this->faq_title );.
So, for that full line:
<?php if ( $this->get_option( 'include-permalink' ) == 'both' or $this->get_option( 'include-permalink' ) == 'text' ) { echo esc_html( $this->get_label( 'label-permalink' ) ) . ' to ' . esc_html( $this->faq_title ); } ?>
Thread Starter
Joel
(@jrisberg)
Thank you. This solution worked well. We ended up using this code to make the link the title of each FAQ:
<div class='ewd-ufaq-permalink'>
Link: <a href='<?php echo esc_attr( $this->permalink ); ?>'>
<?php if ( $this->get_option( 'include-permalink' ) == 'both' or $this->get_option( 'include-permalink' ) == 'text' ) { echo '"' . esc_html( $this->faq_title ) . '"' ;} ?>
<?php if ( $this->get_option( 'include-permalink' ) == 'both' or $this->get_option( 'include-permalink' ) == 'icon' ) { ?> <div class='ewd-ufaq-permalink-image'></div> <?php } ?>
</a>
</div>
-
This reply was modified 1 week, 1 day ago by
Joel.