WordPress.org

Support

Support » How-To and Troubleshooting » Calling Custom Taxonomies within Post Content

Calling Custom Taxonomies within Post Content

  • After many hours of google-ing i still can’t find a solution to this problem – or if it is possible.

    I am setting up the structure for a new site where i have maybe 10 different custom taxonomies, each with 4 or 5 sub tags.

    What i want to be able to do is call these ‘tags’ as links within and at different parts of the ‘post content’ not before or after.

    I am guessing maybe with short-codes, but could find a solution as yet….if anyone can help please.

Viewing 2 replies - 1 through 2 (of 2 total)
  • sorry to bump…..but bump.

    Moderator keesiemeijer

    @keesiemeijer

    Yes shortcodes is the way to go

    Open the functions.php file in your theme. If the file doesn’t exists, create it. Create a function to return your tags:

    function myTags() {
       // call your tags here
    }

    Paste this line after your function:
    add_shortcode('mytags', 'myTags');
    Now that the shortcode is created, you can use it in blog posts and on pages. To use it, simply switch the editor to HTML mode and type the following: [mytags]

    How do you call your tags if you woul’d do it normaly after the content. Then I can make the function for you

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Calling Custom Taxonomies within Post Content’ is closed to new replies.
Skip to toolbar