• Resolved Carl

    (@carlbtmn)


    I’m using the page link field type for one of the fields to use it as a button to a specific page. Is working fine in a query loop, but I don’t know how to change the (rel=”bookmark”) to say “View” or any text instead of the actual value.

    Is there a way to achieve this?

    Thank you.

Viewing 12 replies - 16 through 27 (of 27 total)
  • Thread Starter Carl

    (@carlbtmn)

    Hey! @mr2p

    What about adding a tittle when hovering the link? That way they know what they are clicking since is an icon.

    Plugin Author Phi Phan

    (@mr2p)

    @carlbtmn You could add a title attribute to the a tag or i tag like this:

    <a$1 title='View'><i class='um-faicon-list-alt'></i></a>
    Thread Starter Carl

    (@carlbtmn)

    Simple HTML. I don’t know why I keep thinking there is more to it. ??

    You may close this thread. Thank you.

    Thread Starter Carl

    (@carlbtmn)

    Hello Phi Phan,

    I always come back to this thread for answers. I have another question for you… Is it possible to use a [shortcode] instead of an icon in this case?

    I appreciate your time.

    Thank you.

    Plugin Author Phi Phan

    (@mr2p)

    @carlbtmn Sure, you can do whatever you want in there. If you want to use a shortcode inside this link/button, you can call it like do_shortcode('[yourshortcode /]')

    Thread Starter Carl

    (@carlbtmn)

    I replaced the icon with your code, but is not working. I see the shortcode instead of the value. I also added the shortcode in the page to make sure is working and it is.

    Plugin Author Phi Phan

    (@mr2p)

    Could you please put the whole code here? I need to see everything to know exactly what the issue is.

    Thread Starter Carl

    (@carlbtmn)

    $block_content = preg_replace( '/<a(.+?)>.+?<\\/a>/i',"<a$1 title='More info'>do_shortcode('[um_user user_id='' meta_key='business_name']')</a>", $block_content );
    Plugin Author Phi Phan

    (@mr2p)

    You did it wrong. Do this instead:

    $block_content = preg_replace( '/<a(.+?)>.+?<\\/a>/i', "<a$1 title='More info'>" . do_shortcode("[um_user user_id='' meta_key='business_name']") . "</a>", $block_content );
    Thread Starter Carl

    (@carlbtmn)

    I tried the period before do_shortcode, but I forgot the quotations.

    @mr2p You are amazing! Thank you so much.

    Plugin Author Phi Phan

    (@mr2p)

    You are welcome. By the way, if you don’t mind, could you give this plugin a rating. That will help it grow a lot.

    Thank you. Phi.

    Thread Starter Carl

    (@carlbtmn)

    You got it. Thank you!

Viewing 12 replies - 16 through 27 (of 27 total)
  • The topic ‘Page Link’ is closed to new replies.