Posted: May 12, 2016 at 9:07 am
|
Hi I need to create multiple <div>’s around the event description and its content. There is also an image in the event description which needs an own <div> tag around itself. http://www.fotos-hochladen.net/uploads/18l92ywk73x.png The question: Thanks in advance |
The simplest place to add these, especially for around the image that’s within the description, is right in the text editor when you edit the event. If you want to programmatically wrap the entire event description in div tags, there are a few hooks that you can use. Here’s an example that you can add to your site:
You can add the above to a functions plugin or into your WordPress theme’s functions.php file. |
|
|
Thanks for the quick response. The first one worked just fine however I don’t want to write these <div>’s every time I set up a new event. I know you can duplicate an event so you don’t have to create everything again. However I’m not completely happy with this solution. The second option with the two functions didn’t solve the problem because the <div>’s are around the whole event-content (also around the information-box on the right side with “price, time” etc.) and I just want to have it around the text and the image. Isn’t there one function that displays the event-description text only (and one for images) where i can put my <div> tags around? Thanks in advance |
There is, but it looks like you’ve customized things a bit so I can only guess where that would be. If you can post the template code that you’re working with for the event page I can take a look and try to figure it out. Can you post to a paste bin or gist and link to the code here? |
|
|
I’m working with a theme called Divi. This is the template for the page: I’m not sure if this is enough. |
That doesn’t look like the right template because the markup on the page you linked to doesn’t match the markup in the template. In any case, you can do a search in your theme files for the |
|
The support post ‘Source code from event descirption’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.