Query for album the_permalink() outputs incorrect URL
-
Hello!
I’ve been through about 22 different gallery plugins, and so far, yours is the only one I can properly query (like a post) into my blog loop, using FacetWP.
However, I am having one problem: At present, the code used to create the “Read More” link is as follows:
<p class="read-more"><a href="<?php the_permalink(); ?>"><?php esc_html_e('Read More »','photolite'); ?></a></p>
This works correctly for every other post type except the galleries – the URL is rendered incorrectly using
the_permalink();
and this plugin. For example, the following gallery link,../gallery-album-test-kidz-neuroscience-center-task-force-2017/?album=7768
…when fetched by
the_permalink();
, winds up written as follows:../?post_type=aigpl_gallery&p=7768
And, of course, that puts out a 404 – even if I set permalinks back to “plain” from “post name.” This led me to try borrowing code from the plugin’s own
design-1.php
file, as follows:<p class="read-more"><a href="<?php echo $album_image; ?>" target="<?php echo $album_link_target; ?>"><?php esc_html_e('Read More »','photolite'); ?></a></p>
But that code only echoes the exact URL of the existing page being viewed. For the record, I also tried:
<p class="read-more"><a href="<?php echo $album_image; ?>"><?php esc_html_e('Read More »','photolite'); ?></a></p>
…to no avail.
Is there a function within this plugin that I can use here where it’ll output the URL correctly?
Thanks!
- This topic was modified 7 years, 3 months ago by .
- This topic was modified 7 years, 3 months ago by .
- This topic was modified 7 years, 3 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘Query for album the_permalink() outputs incorrect URL’ is closed to new replies.