Title: Relation doesn&#8217;t hide
Last modified: September 13, 2019

---

# Relation doesn’t hide

 *  Resolved [claudiagaetez](https://wordpress.org/support/users/claudiagaetez/)
 * (@claudiagaetez)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/relation-doesnt-hide/)
 * When I create a bidirectional relation, between 2 elements,
    this appears at 
   all pages, even if I specify where to display
 * How can I fix this?… I hide it at admin-footer.php, but I can’t do this everytime
   I add a page or post
 * $(document).ready(function(){
    var post = $(“#post_ID”).val(); if(post == 2 |
   | post == 118 || post == 45 || post == 9498 || post == 21 || post == 9544 || 
   post== 19 || post == 9541 || post == 11660 || post == 9406 || post == 9407 ||
   post == 9407 || post == 9408 || post == 9411 || post == 9407 || post == 9408 
   || post == 9409 || post == 9410 || post == 9411 || post == 9412 || post == 9413
   || post == 9414 || post == 9415 || post == 9416 || post == 9417 || post == 9418
   || post == 11660 || post == 9419 || post == 9420 || post == 9421 || post == 9422
   || post == 9423 || post == 9424 || post == 9425 || post == 9426 || post == 9427
   || post == 9428 || post == 9427 || post == 9428 || post == 9429 || post == 9430
   || post == 9431 || post == 9432 || post == 9433 || post == 9435 || post == 9663
   || post == 9671 || post == 9668 || post == 9665 || post == 11662 || post == 9666
   || post == 9669 || post == 9675 || post == 9670 || post == 9678 || post == 9621
   || post == 9684 || post == 9686 || post == 9677 || post == 9679 || post == 9667
   || post == 9680 || post == 9676 || post == 9672 || post == 9681 || post == 9674
   || post == 9683 || post == 9619 || post == 9620 || post == 9618 || post == 9673){
   $(“#acf-group_5d3e47199eae3,#acf-group_5d31c32929941”).hide(); } });
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Frelation-doesnt-hide%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [John Huebner](https://wordpress.org/support/users/hube2/)
 * (@hube2)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/relation-doesnt-hide/#post-11928972)
 * I don’t know where this is coming from, but it is not this plugin. This plugin
   contains no JavaScript.
 *  Thread Starter [claudiagaetez](https://wordpress.org/support/users/claudiagaetez/)
 * (@claudiagaetez)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/relation-doesnt-hide/#post-11929099)
 * I added that javascript to force hide
 *  Plugin Author [John Huebner](https://wordpress.org/support/users/hube2/)
 * (@hube2)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/relation-doesnt-hide/#post-11929137)
 * To force hide what? If you don’t what it to be added to every page then you need
   to look at ways to conditionally add the script and not something I’m going to
   be able to help you with here.
 *  Thread Starter [claudiagaetez](https://wordpress.org/support/users/claudiagaetez/)
 * (@claudiagaetez)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/relation-doesnt-hide/#post-11929191)
 * Yes, that’s the thing, I added the conditionally and doesn’t work

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Relation doesn’t hide’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/post-2-post-for-acf.svg)
 * [ACF Post-2-Post](https://wordpress.org/plugins/post-2-post-for-acf/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-2-post-for-acf/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-2-post-for-acf/)
 * [Active Topics](https://wordpress.org/support/plugin/post-2-post-for-acf/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-2-post-for-acf/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-2-post-for-acf/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [claudiagaetez](https://wordpress.org/support/users/claudiagaetez/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/relation-doesnt-hide/#post-11929191)
 * Status: resolved