Support

Account

Home Forums Front-end Issues used short code on another page

Solving

used short code on another page

  • Hy,
    Fist excuse me for my english, that is not perfect.

    I create a field group for my article
    When I use my fiel group on the article I have not problem, I display the text

    my problem is :
    I create a page with all my articles and I would like display the field group in this page.

    I have create a function for use a short code :

    // Fonction exécutée par le shortcode	
    function type_article_shortcode($attr) {
     // Récupère la variable reading_duration
     $thematique = get_field('thematique');
     // Retourne la valeur en HTML
     return "<div>{$thematique} > </div>";
    }
     
    // Enregistre le shortcode pour pouvoir l'utiliser en lui
    // spécifiant la fonction à exécuter
    add_shortcode('type_article', 'type_article_shortcode');

    but nothing display

    thank you for your help …. and sorry for my bad english 🙂

  • Do you want to show the field of another post?

  • since yesterday, I continued to search :

    I have a landing page with all the posts in a category.
    I create this page with wp-bakery and grid editor.
    If I use ACF integrator, I display my field.

    But the problem and i will want use short code for integrate in my content.
    eg : [field] xxxxxxxx [Field] xxxxxxxx

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘used short code on another page’ is closed to new replies.