I am trying to show the parents of a many to many relationship based on the post. It is for Songs so when a song has 2 Songwriters it is only showing one instead of 2.
Here is link:
hidden link
Hi, please take screenshots of the entire View editor in wp-admin so I can take a look at your Query Filters and other settings. I'll review everything and we can go from there.
Okay I don't see anything obviously wrong here, the Query Filter looks okay and the Loop looks good too. Can you tell me how this View is placed on the site? If you inserted the View using a shortcode, please copy and paste that shortcode here for me to review.
Okay, it is placed with a shortcode:
<h1 style="color:rgb(33, 31, 48); text-transform: uppercase;">[wpv-post-title]</h1>
[wpv-view name="songwriters"]
<div class="artist-socials-div">[icon type="facebook-square"][/wpv-conditional][wpv-conditional if="( $(wpcf-twitter) ne '' )"][icon type="twitter"][/wpv-conditional][wpv-conditional if="( $(wpcf-instagram) ne '' )"][icon type="instagram"][/wpv-conditional][wpv-conditional if="( $(wpcf-apple-music) ne '' )"][icon type="apple"][/wpv-conditional][wpv-conditional if="( $(wpcf-spotify) ne '' )"][icon type="spotify"][/wpv-conditional][wpv-conditional if="( $(wpcf-youtube) ne '' )"][icon type="youtube"][/wpv-conditional][wpv-conditional if="( $(wpcf-discog) ne '' )"][/wpv-conditional][wpv-conditional if="( $(wpcf-wiki) ne '' )"][icon type="wikipedia-w"][/wpv-conditional][wpv-conditional if="( $(wpcf-website) ne '' )"][icon type="bullseye"][/wpv-conditional][wpv-conditional if="( NOT(empty($(lyrics))) )"]<button type="button" class="btn btn-lyrics" data-toggle="modal" data-target="#myModal">
LYRICS
</button>[/wpv-conditional]</div><br>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">[wpv-post-title] - Lyrics</h4>
</div>
<div class="modal-body">
<p>[wpv-conditional if="( NOT(empty($(lyrics))) )"][types field='lyrics'][/types][/wpv-conditional]</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-lyrics" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
Okay thanks, let's see if caching is part of the problem.
1. Try disabling caching on this View by modifying the shortcode:
[wpv-view name="songwriters" cached="off"]
2. Try setting WP_CACHE to FALSE in your wp-config.php file, if it is set to true.
define('WP_CACHE', false);
3. Temporarily activate the Pro theme parent and disable any custom code snippets you have created in Toolset > Settings > Custom code tab.
If none of these steps resolve the problem, I'll need to log in and take a closer look. Please provide login credentials in the private reply fields here.
Okay I see now, Oscar Hammerstein's Songwriter post isn't published. It is in Draft status. By default, Views will not show Draft posts unless you add a Post Status query filter, and allow Draft posts to be displayed.
Ahh, man sometimes it is the simple things. Thank you!