Unyson icon indicating copy to clipboard operation
Unyson copied to clipboard

Change post ID from multiselect to permalink(URL)

Open Alex-Ascet opened this issue 11 years ago • 1 comments

Hi all,

I am trying to change the ID from my multi select options from page into permalink instead of ID

if (fw_akg('link_setup/selected_value', $atts) === 'page'){
    $page_options = fw_akg('link_setup/page/page_selected', $atts);
    $page_id = '<?php echo $page_options['0'];?>';
    $page_url = get_permalink('$page_id');
}

I have got this eroor: Parse error: syntax error, unexpected '0' (T_LNUMBER) Below my options:

screen shot 2015-09-02 at 9 53 32 pm

Thank you for your support. @llemurya Any idea? I think I am close to find... or maybe not at all. Thank you in advance.

Alex-Ascet avatar Sep 02 '15 11:09 Alex-Ascet

@Alex-Ascet the problem is that you tried to acces non-existent key, you must access $page_options[0] not $page_options['0']

llemurya avatar Sep 03 '15 05:09 llemurya