Hi Jonathan,
I want not to get images from a specific other post, but I want select from image library…
In post 55 I created a gallery with acf field and I selected 5 images connected to other post and 1 image uploaded in that post (55)…
I view 6 images with:
<?php echo get_field('imggal'); ?>
with the other solution I view only 1 image, the only one connected with that post (55)
sorry for my english 😛
nothing… 🙁
I solved with “peter login redirect” plugin.
With ACF field I can manage various controls through the id of the course but not redirect.
With plugin all right : )
anyway… thanks very much!!!
It’s displayed “1” (I login as administrator)
in header.php I put:
global $current_user;
$current_user = wp_get_current_user();
$user_verify = wp_signon( $login_data, true );
doesn’t work…
in page.php I do an inclusion:
if (is_page(145)) { include ('area_riservata.php'); }
I shared code of this page here: https://codeshare.io/TLsfK
sorry, maybe it’s for my bad english…
i tested both your solution but nothing… : (
I created a select to display my taxonomy in single user profile
(http://imagizer.imageshack.us/a/img921/9871/kDCADK.jpg)
as you can see in the image (http://imagizer.imageshack.us/a/img922/3117/6vwoDC.jpg), I associated the “training pratico” course to “utenteprova”.
I want to get id and name of taxonomy of current user
(in this case UTENTEPROVA has TRAINING-PRATICO with ID 7)
I need to redirect users after login, so I need something like this
'redirect' => get_option('siteurl').'/corsi/training-pratico
but I can’t display slug training-pratico
another possible solution could be
$corso_id = get_field('corso', 'user_'.$current_user->ID );
'redirect' => get_option('siteurl').'/?corsi='.$corso_id
it return /?corsi=7
but it’s a not found page.. Do it exist a permalink to term of taxonomy?
In admin is:
wp-admin/edit-tags.php?action=edit&taxonomy=corsi&tag_ID=7&post_type=formazione
I’m trying to display name of term field that is associated in user profile…
in acf i set: type field “taxonomy” and value term id (I test object term too but it doesn’t work)
and in user profile I set one of course in select.
thank you very much @jonathan :))))
sorry eliot, my english is very bad and maybe I translate literally from italian 😛
I meant that i always used in the past radiobutton to chose one chance and it worked well but this time I need to be able to select more than one choice, so I have to use checkboxf field so previous comment are correct but the code doesn’t work 🙁
Hi Eliot
Thanks but nothing 🙁
I always used radiobutton, in fact I tried and it’s perfect but I need to be able to select more than one choice.
I Eliot,
I tried but without result 🙁
I’m in page.php and after header e before footer I wrote:
<?php if (is_page('6')) { ?>
<?php
$pagecat = get_pages(array(
'meta_query' => array(
array(
'key' => 'categorie',
'value' => '"ceg"',
'compare' => 'LIKE'
)
)
));
if( $pagecat ) { ?>
<ul>
<?php foreach ($pagecat as $pagecats) { ?>
<li>
<a href="<?php echo get_page_link($pagecats->ID); ?>">
<?php echo get_the_title($pagecats->ID); ?>
</a>
</li>
<?php } ?>
</ul>
<?php } ?>
<?php } else { ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
</div>
<?php endwhile; ?>
<?php } ?>
It show all pages but only one page in cms has “ceg” value checked.
where did I go wrong?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.