• Hi,
    I have

    <?php
                            if($title) {
                                                    echo $before_title.$title.$after_title;
                            }
                            ?>

    it’s displaying the category name. How can I show the category link instead of only the name?

    Thx

Viewing 7 replies - 1 through 7 (of 7 total)
  • The snippet of code you are showing really does not provide enough context. It looks to be from a plugin … it may be useful to link to a http://pastebin.com of the code.

    Thread Starter jumust

    (@jumust)

    Yep you are right it’s from a plugin that is part of the theme I’m using.

    Here it’s the pastebin of the whole file http://pastebin.com/33njxvH2

    It has as output a widget to show the last recent posts of a category you can select within the widget itself

    Thread Starter jumust

    (@jumust)

    Do you think you need any other files?

    Just let me know which functions you are looking for and I will search it through files

    Thanks

    Thread Starter jumust

    (@jumust)

    Hey Edward Caissie Theme Review Admin,
    did you see my pastebin? Any solution?

    @jumust – Sorry, I just saw you had replied.

    It appears the widget may accept multiple categories as part of its options. You will have to consider either insuring you only ever choose one category; or, write code to use a specific category (the easiest is the first category choice from the options field); then write the appropriate code to use your category choice as a link.

    Once you have sorted out the above simply wrap the $title in the category link anchor.

    Have a look at my ‘BNS Featured Category‘ plugin for some ideas.

    Thread Starter jumust

    (@jumust)

    Thanks for your help!

    Here it is the widget, you can select one category, choose the title and number of posts shown, finally the thumbnail

    http://screencast.com/t/Gp5w17chrNU

    I can’t handle what you suggested, too tricky for my knowledge. I don’t want absolutely to use other plugin on my site because I have already a lot, but looks like this plugin will make the trick http://wordpress.org/extend/plugins/gg-widget-title-link/

    Yes, that widget does look like it offers you a work-around for your issue.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Display category as link’ is closed to new replies.