• Resolved hoohum

    (@hoohum)


    I have added [wpfp-link] to a text element in Elementor on a standard WP page and I can see the link perfectly when viewing the page. I added the same to a post using an Elementor template but all I see is the code for the link i.e. [wpfp-link]. I need this for a custom post type though and have edited the line required to read: $qry[‘post_type’] = array(‘post’,’page’,’custom-post-name’); but the link still shows the code instead on any custom post. Is there anything I need to wrap the shortcode in to make it work on single.php pages (using the Elementor page builder). I tried using the shortcode element but then nothing shows at all, not even code. Can anyone hope please?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter hoohum

    (@hoohum)

    The issue is now solved. I found a Toolset support ticket (I use Toolset too) and I added the following to my child theme functions.php page:

    add_shortcode( ‘my-wpfp-link’, ‘my_wpfp_link_func’ );
    function my_wpfp_link_func(){
    return wpfp_link(1);
    }

    In an Elementor text element on the page I then added:

    [my-wpfp-link]

    …and then everything worked. I don’t think there’s any reason why this wouldn’t work without Toolset. It’s just a solution that Toolset happened to provide.

    Thank you for providing the solution, I wish more people did that.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[wpfp-link] Not working on posts page’ is closed to new replies.