Anyway to add a div to wrap around custom posts?

RE:Custompress
When viewing the custom posts, Im trying to add css to format it,. but it doesnt have any unique divs so i can target it. If I make a css change, it affects other parts of my site too. SO I was owndering if anyone knew how and coudl tell me where I could add a div wrap around the custom post?

  • Shane7
    • Site Builder, Child of Zeus

    I know but i dont know where to add the div... It has to be to one of the files that came with custompress, i just cant figure out which one. I cant add it to one of my theme files because then it woudl apply to all other pages also..

  • Abaloo
    • The Incredible Code Injector

    Are the posts created with the custom content type by CustomPress going onto their own page? Or their own area of a page? If on their own page you could create a dedicated template file ad add whatever classes you like around the data coming from the post. And the same really if they're coming intotheir own region.

    If you have them feeding in randomly amongst lots of other content from other post types, then I guess you would need some conditional logic in whatever template file is concerned.

  • Shane7
    • Site Builder, Child of Zeus

    I have it like this:
    The home page lists the recent custom posts (which are images).. Then if i click on one of the thumbnails, it opens up into the custom post page. looks just like the standard post page.

    So im trying to figure out a way to add the div wrap around the original query from the original custompress file.

  • Abaloo
    • The Incredible Code Injector

    Hi Shane,

    It looks like your theme is outputting your individual custom post through the single.php template file, as it should if you have nothing more specific.

    If you create a new template file called single-custompostname.php (where custompostname is the name of your custom post) then you can customise the classes in that to your liking, without impacting on the rest of your theme.

    You could begin this by simply copying and pasting the contents of single.php into your new single-custompostname.php file, so you have a base, and make the changes to that. Don't change single.php however (not without backing it up first).

    Hope that helps :slight_smile:

  • Shane7
    • Site Builder, Child of Zeus

    I had tried that, but im using catalyst theme and it doesnt reconize it. so im still trying to find where to add a div inside of teh original files. Im about to pass out soon though. lol. 4am here
    thanks for all the help you gave. I appreciate it.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.