We are using proffesional version of Par for Post for Woocommerce and our problem is that neigher user, neigher administrator cant see what post is the product related to after they are posted. So after product purchase the customer has to know link to the post, otherwise he cant access it throuigh the product page, thats what we need. Also as administrators we need to know what post is linked to what product.
For logged in users we need to have a list not only of orders (products) the user bought but primarily of the posts that are linked to the products so he can access the content he bought not the product, that mean nothing to him to be honest.
I’m looking forward for your reply.
Thanks in advance and have a nice day,
Ivan Anikin
techdocker.com
I have two CPTs, one called Ligas (leagues) and the other Clubes (clubs), both related to ACF (relacion_ligas_clubes). When I show a club, it should show which leagues it belongs to. I was able to do some of that with the following code in the single.php file, but what it outputs is the league id:
<?php if (in_category('clubes')) { ?>
<p><strong>Liga:</strong> <?php the_field('relacion_ligas_clubes'); ?></p>
<?php } ?>
I would need to show the name of the league and that in turn be a link that takes me to it.
I also tried this code, but it shows me the “clubes” category:
<li><strong>Liga:</strong>
<?php
$name = get_post( ($id) )->post_type;
echo $name;
?>
</li>
CPT Ligas:
https://contextodigital.com.ar/futbolinterior/ligas/
CPT Clubes:
https://contextodigital.com.ar/futbolinterior/clubes/
Club:
https://contextodigital.com.ar/futbolinterior/clubes/club-atletico-acassuso/
If someone could help me, I will appreciate it.
]]>I have the following situation:
Xpl — relations field —> Ypl
I am using WPML, so I immediately have the relation:
Xeng — relations field —-> Yeng (“copy” setting in WPML)
I installed ACFE to achieve bidirectional relation.
Bidirectional works for primary language:
Xpl <— relations field — Ypl
But relationships in a different language version are not synchronized:
Xeng <— relations field —- Yeng
Anyone have an idea why this might be happening?`
]]>I used
[vg_display_data key="regia" data_source="post_meta"]
I’ve been trying to set nested acf relations ship is so, so many ways that I can’t even lit it there.
basically I have three custom post types : CPT1, CPT2, CPT3
CPT1 and CPT2 have bidirectional relationship field named cpt1_to_cpt2 and cpt2_to_cpt1
the same goes for CPT2 with CPT3
I would like to display something that could intuitively be
[related cpt1_to_cpt2]
[field title]
[related cpt2_to_cpt3]
[field title]
[/related]
[/related]
I tried all what I could think of, using loops, usig “-” to diferentiate shorcode…
is there any way to acheive this, this would be a killer feature
thank’s
Here is the scenario…
I have two PODS, the POD1 and the POD2, both are relative pods, I add category to POD1 depending from value of custom field on POD2
When I add/remove relationship from POD1 post everything works
When I add/remove relationship from POD2 post need to take values from field of POD1 and set categories again.
I think will be more easy if I update POD1 but need to call pods_api_post_save_pod_item_post for POD1.
There is any way to update POD1 programmatically and call pods_api_post_save_pod_item_post?
Thanks in advance
]]>Then, I have activated the module for Accounting, and when I register with the same email, the system don’t let me add it.
I found that adding in the database in the table <strong>web_erp_people_type_relations</strong>
it can related, and is easier. So, it would be great add relations in the Front, and no go to the databases.
Another issue that I have found in accounting system, is that the Country and State could be saved, but is not showing correctly in the contact when you edit in the Accounting system, but it shows correctly in the CRM module.
Let me know if you need more data to solve this issue.
Thanks !
]]>I would like to loop through nested acf relationships.
I’ve seen this topic, but it’s closed so I’m reoppening the issue.
The idea is to go from post A to post B to post C or more rigourrously form post A to its related posts B.x, and from each posts B.x to their related posts C.x
I have created two meta-shortcode MSH1 and MSH2
MSH1
is on post A, and basically get the id of the related posts of A, and pass it for MSH2 like such :
<ul>
[related AtoB]
[field id]
[pass field=id]
[if field=id id={FIELD} empty=false]
<li>[MSH2 passedid='{FIELD}']</li>
[/if]
[/pass]
[/related]
</ul>
MSH2 :
get the passed value and use it in a loop like such :
[loop id={PASSEDID}]
[field title]
[/loop]
This is all ok, it display a list with every post B.x IDs and Titles
However if I change MSH2 to like such
[loop id={PASSEDID}]
<ul>
[related BtoC]
<li> --> [field title]</li>
[/related]
</ul>
[/loop]
The fist post, B.1, ID and Title are displayed, and the nested list for C.x posts is displayed with the appropriate titles
But instead of having B.2, B.3 IDs and Title, I do have postA ID
Do you have any other idea how to approach this issue ?
Thank’s in advance
x_data:
several columns, some with ids and id/name lookups, but for simplicity I am leaving pout most of it so it does not get too confusing, hopefully.
x_endowment:
CREATE TABLE x_endowment
(id int(10) NOT NULL auto_increment
,name varchar(255) NOT NULL
,PRIMARY KEY (id)
) ENGINE InnoDB DEFAULT CHARACTER SET utf8 COLLATE=utf8_general_ci;
x_endowment_nm:
CREATE TABLE x_endowment_nm
(id_data int(11) NOT NULL
,id_endowment int(11) NOT NULL
,PRIMARY KEY (id_data,id_endowment)
) ENGINE InnoDB DEFAULT CHARACTER SET utf8 COLLATE=utf8_general_ci;
In the data project pages:
x_data, x_endowment, x_endowment_nm set as type “parent/child”
In the table options for x_data:
type: n:m
source column: id
target table: x_endowment
target column: id
relation table: x_endowment_nm
table options for x_endowment:
none
table options for x_endowment_nm:
type: 1:n
source column: id_data
target table: x_data
target column: id
type: 1:n
source column: id_endowment
target table: x_endowment
target column: id
type: lookup
source column: id_data
target table: x_data
target column: id
lookup: title
type: lookup
source column: id_endowment
target table: x_endowment
target column: id
lookup: name
What I am getting: BE-Editing of x_data with the created WP Data Access page more or less works, meaning: the relation form below the normal fields appears. However, I am not getting the available rows from x_endowment, I can only create new rows, which then get a new row in x_endowment and a new row in x_endowment_nm with their corresponding ids.
What I was thinking of getting: being able to choose from the pool of already existing x_endowment rows and assigning them to the x_data rows, whereas x_endoement_nm holds the info about those. So I have a pool of x_endowment entries which can be reused and each only exist one time, being able to assign them to multiple x_data ids – or the other way around if you will.
I am relatively new to relations with a junction table, let alone WP data Access, so could somebody please bring some light to my rather hopeless situation?!
Thanks a lot!
]]>