Forums

Taxonomy Terms List
[resolved] Change the position (10 posts)

  1. Niraj Chauhan
    Member
    Posted 1 year ago #

    Hi, i liked your plugin very much,
    but i want to make some changes in it, normally custom taxonomies are displayed exactly after the post, but i want to display it above the post,
    for example check this image i want in this position
    http://i56.tinypic.com/2vctjlf.jpg

    and just like courses i will also add Location in post and i want location taxonomies in it

    how can i do this???

  2. Michael Fields
    Theme Wrangler
    Posted 1 year ago #

    This is out of the scope of what I intended the plugin to do. It looks like you wish to add the terms inside your post_content. If this is true, then you will want to create a custom shortcode to do so.

  3. Niraj Chauhan
    Member
    Posted 1 year ago #

    thanks for your reply
    My php knowledge is weak, can you guide me what i have to do or what code changes i have to make,
    it will be a nice help

  4. Niraj Chauhan
    Member
    Posted 1 year ago #

    Hey forget that above comment
    i coded little bit i used add_shortcode in ur plugin file
    and do_shortcode in my theme single.php file
    everything is coming as it should, the position is also correct, but now i am getting two outputs, the last which is the original output, i dont want that to come,
    how can i avoid that???

  5. Michael Fields
    Theme Wrangler
    Posted 1 year ago #

    Glad you got that part sorted! This part should be rather easy. Look gor this code on line 39:

    add_filter( 'the_content', 'mfields_taxonomy_terms_list' );

    and either comment it out or delete it.

    If you are directly modifying this plugin it is better to add it's functions to your theme's functions.php file or rename it. This way you will not run the risk of accidentally overwriting your updates when I update the plugin.

  6. Niraj Chauhan
    Member
    Posted 1 year ago #

    thanks a lot, its done
    i appreciate your help
    there is one more short but not a correct way
    in the line of

    if( is_single() )
    return $c . $o;
    return $c;

    if you change this part then it will give you exact above the post

    return $o.$c;

    its not a proper way then too
    thanks a lot
    you made my day

  7. Michael Fields
    Theme Wrangler
    Posted 1 year ago #

    No problem. Glad I could help :)

  8. Niraj Chauhan
    Member
    Posted 1 year ago #

    hey i need one more help
    i have two custom taxonomies, which i want to display but the alignment is not proper, any how i tried to change in the plugin code by using <table> tag but the second one (Duration) taxonomy is not proper
    check the image here
    http://i52.tinypic.com/fjlzz6.jpg

    the code which i edited is here

    $o.= get_the_term_list( $post->ID, $name, $before = '<p><span class="mfields-taxonomy-term-list-name">'.'<table><tr><td>' . $config->label . ':</td><td> ', $sep = ', ', $after = '</td></tr></table></span></p>' );

    i want both custom taxonomy in proper alignment as the remaining content is

  9. Niraj Chauhan
    Member
    Posted 1 year ago #

    in other words how can i separate the taxonomies?
    i mean the plugin code which you provided will include all the custom taxonomies,
    but if i just want to display certain custom taxonomies then how can i do that?
    this will make me to display and align them in proper order

    I know this is a stupid question but can you guide me in this?
    :)

  10. Niraj Chauhan
    Member
    Posted 1 year ago #

    you are a great coder
    just now i found your one more plugin which can be perfect for me,
    Taxonomy List Shortcode Plugin
    now i just wanna know that instead of writing every time in post [taxonomy-list tax='category'], is there any way to keep this permanent in my single.php file????
    i tried this code but seems to be incorrect
    <?php echo ("[taxonomy-list tax='category']"); ?>

    what will be the correct way, and i also dont want that

    • in it, i just want plain links to appear

      and also guide me to the upper question
      i am new to php so weak in knowledge

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic