Support

Account

Home Forums General Issues ACF page_link does not work!

Solved

ACF page_link does not work!

  • Hi to all!

    Here is the thing. I have Installed locally an older version of wordpress(4.3.6) and ACF version(4.4.5) which works fine!
    By the other hand I am currently developing a web site ,online, with wordpress (4.6.1) and ACF version (4.4.11) ,and the page _link does not work,which means I can’t link the page_links I’ve setted.

    Please if anyone had the same problem,with ACF Page_link I would really appreciate it if he answers .
    Thank you for taking time reading my post.

  • Hi @fotis

    I’ve just tested it on my end but failed to reproduce the issue. It’s possible that there’s a conflict on your site. Could you please try to reproduce the issue on one of the WordPress’ stock themes (like Twenty Sixteen) with other plugins deactivated? If it disappears, then you can activate the theme and plugins one by one to see which one causes the issue.

    If the issue persists, could you please share the XML export file of your field group so I can test it out on my installation?

    Thanks 🙂

  • Hi @James
    This is my code from index.php….It is a theme developed from scratch for the needs of the client.
    I am sending you the code and the pages have exactly the same name as the fields.
    Also i didn’t had any plugin activated besides Akismet…. Still can not understand what I am doing wrong.
    This is the url of my web site http://panagiafaneromeni.mpoursm.xyz/. Do you think the server I am testing the website has to do something.?
    Thank you again

    <div class="side-bar-menu alpha">
         
            
          <p>KALVS HRUATE </p>
        </div>
          
         
         <div class="item1">
                <h4><a href="<?php the_field('arxikh'); ?>">ARXIKH</a></h4>
        </div> 
        <div class="item1">
             <h4><a href= "<?php the_field('naosagioustefanou'); ?>">NAOC AGIOY CTEFANOY</a></h4>
        </div>
          
        <div class="item1">
          <h4><a href= "<?php the_field('poimantikh-diakonia'); ?>">POIMANTIKH DIAKONIA</a></h4>
          <ul>
            <li><a href="<?php the_field('IERA_EJOMOLOGHCH'); ?>">IERA EJOMOLOGHCH</a></li>
            <li><a href="<?php the_field('KATHXHTIKA_CXOLEIA'); ?>">KATHXHTIKA CXOLEIA</a></li>
           
          </ul>
        </div>
    <div class="item1">
          <h4><a href= "<?php the_field('filanurvpia'); ?>" >FILANURVPIKH DRASTHRIOTHTA</a></h4>
          <ul>
            <li><a href="<?php the_field('TRAPEZA_AGAPHC'); ?>">TRAPEZA AGAPHC</a></li>
            <li><a href="<?php the_field('FILOPTVXO_TAMEIO'); ?>">FILOPTVXO TAMEIO</a></li>
    
     <li><a href="<?php the_field('TRAPEZA_TROFIMVN'); ?>">TRAPEZA TROFIMVN</a></li>
           
          </ul>
        </div>
    
          
    
  • Hi @fotis

    Could you please share the XML export file of your field group? I suspect you set the location of the field group to a page, but you call the fields from the sidebar. In this case, you need to pass the post/page ID where the fields are assigned like this:

    the_field('arxikh', 99);

    Where “99” is the post/page ID. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/get_field/.

    I hope this makes sense 🙂

  • Dear @James

    I am posting the xml file

    
    
    <?xml version="1.0" encoding="UTF-8" ?>
    <!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your site. -->
    <!-- It contains information about your site's posts, pages, comments, categories, and other content. -->
    <!-- You may use this file to transfer that content from one site to another. -->
    <!-- This file is not intended to serve as a complete backup of your site. -->
    
    <!-- To import this information into a WordPress site follow these steps: -->
    <!-- 1. Log in to that site as an administrator. -->
    <!-- 2. Go to Tools: Import in the WordPress admin panel. -->
    <!-- 3. Install the "WordPress" importer from the list. -->
    <!-- 4. Activate & Run Importer. -->
    <!-- 5. Upload this file using the form provided on that page. -->
    <!-- 6. You will first be asked to map the authors in this export file to users -->
    <!--    on the site. For each author, you may choose to map to an -->
    <!--    existing user on the site or to create a new user. -->
    <!-- 7. WordPress will then import each of the posts, pages, comments, categories, etc. -->
    <!--    contained in this file into your site. -->
    
    <!-- generator="WordPress/4.6.1" created="2016-11-08 09:06" -->
    <rss version="2.0"
    	xmlns:excerpt="http://wordpress.org/export/1.1/excerpt/"
    	xmlns:content="http://purl.org/rss/1.0/modules/wp-content/"
    	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    	xmlns:dc="http://purl.org/dc/elements/1.1/"
    	xmlns:wp="http://wordpress.org/export/1.1/"
    >
    
    <channel>
    	<title>ΠΑΝΑΓΙΑ ΦΑΝΕΡΩΜΕΝΗ</title>
    	<link>http://panagiafaneromeni.mpoursm.xyz</link>
    	<description>ΙΣΤΟΤΟΠΟΣ ΙΕΡΟΥ ΝΑΟΥ ΠΑΝΑΓΙΑΣ ΦΑΝΕΡΩΜΕΝΗΣ ΤΡΙΚΑΛΩΝ</description>
    	<pubDate>Tue, 08 Nov 2016 09:06:58 +0000</pubDate>
    	<language></language>
    
    		<title>side-bar-menu alpha</title>
    		<link>http://panagiafaneromeni.mpoursm.xyz/?acf=acf_side-bar-menu-alpha</link>
    		<pubDate>Sun, 06 Nov 2016 16:01:26 +0000</pubDate>
    		<dc:creator></dc:creator>
    		<guid isPermaLink="false">http://panagiafaneromeni.mpoursm.xyz/?post_type=acf&p=41</guid>
    		<wp:post_id>41</wp:post_id>
    		<wp:post_date>2016-11-06 19:01:26</wp:post_date>
    		<wp:post_date_gmt>2016-11-06 16:01:26</wp:post_date_gmt>
    		<wp:comment_status>closed</wp:comment_status>
    		<wp:ping_status>closed</wp:ping_status>
    		<wp:post_name>acf_side-bar-menu-alpha</wp:post_name>
    		<wp:status>publish</wp:status>
    		<wp:post_parent>0</wp:post_parent>
    		<wp:menu_order>0</wp:menu_order>
    		<wp:post_type>acf</wp:post_type>
    		<wp:post_password></wp:post_password>
    		<wp:postmeta>
    			<wp:meta_key>_edit_last</wp:meta_key>
    			<wp:meta_value><![CDATA[1]]></wp:meta_value>
    		</wp:postmeta>
    		<wp:postmeta>
    			<wp:meta_key>field_581f50cc98322</wp:meta_key>
    			<wp:meta_value><![CDATA[a:11:{s:3:"key";s:19:"field_581f50cc98322";s:5:"label";s:17:"naosagioustefanou";s:4:"name";s:17:"naosagioustefanou";s:4:"type";s:9:"page_link";s:12:"instructions";s:0:"";s:8:"required";s:1:"0";s:9:"post_type";a:1:{i:0;s:3:"all";}s:10:"allow_null";s:1:"0";s:8:"multiple";s:1:"0";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:2:{s:5:"field";s:4:"null";s:8:"operator";s:2:"==";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:1;}]]></wp:meta_value>
    		</wp:postmeta>
    		<wp:postmeta>
    			<wp:meta_key>field_581f512e98323</wp:meta_key>
    			<wp:meta_value><![CDATA[a:11:{s:3:"key";s:19:"field_581f512e98323";s:5:"label";s:19:"POIMANTIKH DIAKONIA";s:4:"name";s:19:"poimantikh-diakonia";s:4:"type";s:9:"page_link";s:12:"instructions";s:0:"";s:8:"required";s:1:"0";s:9:"post_type";a:1:{i:0;s:3:"all";}s:10:"allow_null";s:1:"0";s:8:"multiple";s:1:"0";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:4:"null";s:8:"operator";s:2:"==";s:5:"value";s:0:"";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:2;}]]></wp:meta_value>
    		</wp:postmeta>
    		<wp:postmeta>
    			<wp:meta_key>field_581f515098324</wp:meta_key>
    			<wp:meta_value><![CDATA[a:11:{s:3:"key";s:19:"field_581f515098324";s:5:"label";s:54:"http://panagiafaneromeni.mpoursm.xyz/iera-ejomologhch/";s:4:"name";s:54:"http://panagiafaneromeni.mpoursm.xyz/iera-ejomologhch/";s:4:"type";s:9:"page_link";s:12:"instructions";s:0:"";s:8:"required";s:1:"0";s:9:"post_type";a:1:{i:0;s:3:"all";}s:10:"allow_null";s:1:"0";s:8:"multiple";s:1:"0";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:4:"null";s:8:"operator";s:2:"==";s:5:"value";s:0:"";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:3;}]]></wp:meta_value>
    		</wp:postmeta>
    		<wp:postmeta>
    			<wp:meta_key>field_581f517198325</wp:meta_key>
    			<wp:meta_value><![CDATA[a:11:{s:3:"key";s:19:"field_581f517198325";s:5:"label";s:56:"http://panagiafaneromeni.mpoursm.xyz/kathxhtika-cxoleia/";s:4:"name";s:56:"http://panagiafaneromeni.mpoursm.xyz/kathxhtika-cxoleia/";s:4:"type";s:9:"page_link";s:12:"instructions";s:0:"";s:8:"required";s:1:"0";s:9:"post_type";a:1:{i:0;s:3:"all";}s:10:"allow_null";s:1:"0";s:8:"multiple";s:1:"0";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:4:"null";s:8:"operator";s:2:"==";s:5:"value";s:0:"";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:4;}]]></wp:meta_value>
    		</wp:postmeta>
    		<wp:postmeta>
    			<wp:meta_key>field_581f518e98326</wp:meta_key>
    			<wp:meta_value><![CDATA[a:11:{s:3:"key";s:19:"field_581f518e98326";s:5:"label";s:11:"filanurvpia";s:4:"name";s:11:"filanurvpia";s:4:"type";s:9:"page_link";s:12:"instructions";s:0:"";s:8:"required";s:1:"0";s:9:"post_type";a:1:{i:0;s:3:"all";}s:10:"allow_null";s:1:"0";s:8:"multiple";s:1:"0";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:4:"null";s:8:"operator";s:2:"==";s:5:"value";s:0:"";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:5;}]]></wp:meta_value>
    		</wp:postmeta>
    		<wp:postmeta>
    			<wp:meta_key>field_581f51b398327</wp:meta_key>
    			<wp:meta_value><![CDATA[a:11:{s:3:"key";s:19:"field_581f51b398327";s:5:"label";s:52:"http://panagiafaneromeni.mpoursm.xyz/trapeza-agaphc/";s:4:"name";s:52:"http://panagiafaneromeni.mpoursm.xyz/trapeza-agaphc/";s:4:"type";s:9:"page_link";s:12:"instructions";s:0:"";s:8:"required";s:1:"0";s:9:"post_type";a:1:{i:0;s:3:"all";}s:10:"allow_null";s:1:"0";s:8:"multiple";s:1:"0";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:4:"null";s:8:"operator";s:2:"==";s:5:"value";s:0:"";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:6;}]]></wp:meta_value>
    		</wp:postmeta>
    		<wp:postmeta>
    			<wp:meta_key>field_581f531c98328</wp:meta_key>
    			<wp:meta_value><![CDATA[a:11:{s:3:"key";s:19:"field_581f531c98328";s:5:"label";s:54:"http://panagiafaneromeni.mpoursm.xyz/filoptvxo-tameio/";s:4:"name";s:54:"http://panagiafaneromeni.mpoursm.xyz/filoptvxo-tameio/";s:4:"type";s:9:"page_link";s:12:"instructions";s:0:"";s:8:"required";s:1:"0";s:9:"post_type";a:1:{i:0;s:3:"all";}s:10:"allow_null";s:1:"0";s:8:"multiple";s:1:"0";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:4:"null";s:8:"operator";s:2:"==";s:5:"value";s:0:"";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:7;}]]></wp:meta_value>
    		</wp:postmeta>
    		<wp:postmeta>
    			<wp:meta_key>field_581f533f98329</wp:meta_key>
    			<wp:meta_value><![CDATA[a:11:{s:3:"key";s:19:"field_581f533f98329";s:5:"label";s:54:"http://panagiafaneromeni.mpoursm.xyz/trapeza-trofimvn/";s:4:"name";s:54:"http://panagiafaneromeni.mpoursm.xyz/trapeza-trofimvn/";s:4:"type";s:9:"page_link";s:12:"instructions";s:0:"";s:8:"required";s:1:"0";s:9:"post_type";a:1:{i:0;s:3:"all";}s:10:"allow_null";s:1:"0";s:8:"multiple";s:1:"0";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:4:"null";s:8:"operator";s:2:"==";s:5:"value";s:0:"";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:8;}]]></wp:meta_value>
    		</wp:postmeta>
    		<wp:postmeta>
    			<wp:meta_key>position</wp:meta_key>
    			<wp:meta_value><![CDATA[normal]]></wp:meta_value>
    		</wp:postmeta>
    		<wp:postmeta>
    			<wp:meta_key>layout</wp:meta_key>
    			<wp:meta_value><![CDATA[no_box]]></wp:meta_value>
    		</wp:postmeta>
    		<wp:postmeta>
    			<wp:meta_key>hide_on_screen</wp:meta_key>
    			<wp:meta_value><![CDATA[]]></wp:meta_value>
    		</wp:postmeta>
    		<wp:postmeta>
    			<wp:meta_key>field_581f5564225f7</wp:meta_key>
    			<wp:meta_value><![CDATA[a:11:{s:3:"key";s:19:"field_581f5564225f7";s:5:"label";s:6:"arxikh";s:4:"name";s:6:"arxikh";s:4:"type";s:9:"page_link";s:12:"instructions";s:0:"";s:8:"required";s:1:"0";s:9:"post_type";a:1:{i:0;s:3:"all";}s:10:"allow_null";s:1:"0";s:8:"multiple";s:1:"0";s:17:"conditional_logic";a:3:{s:6:"status";s:1:"0";s:5:"rules";a:1:{i:0;a:3:{s:5:"field";s:4:"null";s:8:"operator";s:2:"==";s:5:"value";s:0:"";}}s:8:"allorany";s:3:"all";}s:8:"order_no";i:0;}]]></wp:meta_value>
    		</wp:postmeta>
    		<wp:postmeta>
    			<wp:meta_key>rule</wp:meta_key>
    			<wp:meta_value><![CDATA[a:5:{s:5:"param";s:4:"page";s:8:"operator";s:2:"==";s:5:"value";s:1:"4";s:8:"order_no";i:0;s:8:"group_no";i:0;}]]></wp:meta_value>
    		</wp:postmeta>
    	</item>
    </channel>
    </rss>

    Still doen not work and I am really sad.Also I have deleted some lines for sequrity reasons,like admin name,email and so on
    Thank you anyway for taking time ,to solve my request!

  • Got the solution finally.!!

    @James
    thank you so much….so here is the thing

    1) You must give the fields the name you want.
    2) below there is a sselection option which tells you where to show those fields.
    3) choose for an example front-page.
    4)In the front page below ,in the page settings it is going to be if right the fields and where to link each other.
    That’s it if right the pag_link() works fine!

    <?php the_field('field_name'); ?>

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘ACF page_link does not work!’ is closed to new replies.