1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP in Category Descriptions

Discussion in 'XenForo Questions and Support' started by LPH, Jan 9, 2013.

  1. LPH

    LPH Well-Known Member

    Text or HTML tags can be added to the category description field but has anyone figured out a way to add php?

    If adding PHP is not available then in the area of the description, I would like to put my own php script. Is that possible? How would it be done?

    Are we talking about an add-on which hooks to that area ? (Ugh, that's way out of my reach).
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    Yeah you can't just randomly add PHP to places in the code unfortunately.

    You would need an add on.

    What is the php you want to add there?
     
  3. LPH

    LPH Well-Known Member

    This might be best explained by an example: A visitor lands on education.tuxreportsnetwork.com and they will see the latest blog posting on education. Land on business.tuxreportsnetwork.com then the latest business article shows.

    I'd like to do the same at the top of each category in XF; that is, show the latest title and excerpt of the latest blog posting from that category. This would be a few "simple" lines php code pulling from the WP database.

    Hopefully that makes sense.
     

Share This Page