WordPress.org

Ready to get started?Download WordPress

Forums

Calling Custom Taxonomies within Post Content (3 posts)

  1. richjohnhughes
    Member
    Posted 4 years ago #

    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.

  2. richjohnhughes
    Member
    Posted 4 years ago #

    sorry to bump.....but bump.

  3. keesiemeijer
    moderator
    Posted 4 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags