{"id":3437199,"date":"2013-02-05T11:40:02","date_gmt":"2013-02-05T11:40:02","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/adding-content-to-pages\/"},"modified":"2016-08-20T21:18:11","modified_gmt":"2016-08-20T21:18:11","slug":"adding-content-to-pages","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/adding-content-to-pages\/","title":{"rendered":"Adding content to pages"},"content":{"rendered":"<p>Hi<\/p>\n<p>I have pages that I need to add content too.<\/p>\n<pre><code>&lt;div class=&quot;portfolio&quot;&gt;\n\t\t\t\t\t\t\t\t&lt;div class=&quot;portfolioPadding&quot;&gt;\n\t\t\t\t\t\t\t\t\t&lt;a href=&quot;f4p.html&quot;&gt;&lt;img src=&quot;images\/f4pHome1.jpg&quot; alt=&quot;Image of Bulletproof Designs&quot;\/&gt;&lt;\/a&gt;\n\t\t\t\t\t\t\t\t&lt;\/div&gt;&lt;!-- end .portfolioPadding --&gt;\n\t\t\t\t\t\t\t&lt;\/div&gt; &lt;!-- end .portfolio --&gt;\n\t\t\t\t\t\t\t&lt;div class=&quot;portfolio&quot;&gt;\n\t\t\t\t\t\t\t\t&lt;div class=&quot;portfolioPadding&quot;&gt;\n\t\t\t\t\t\t\t\t\t&lt;a href=&quot;f4p.html&quot;&gt;&lt;img src=&quot;images\/lt4mHome.jpg&quot; alt=&quot;Image of Bulletproof Designs&quot;\/&gt;&lt;\/a&gt;\n\t\t\t\t\t\t\t\t&lt;\/div&gt;&lt;!-- end .portfolioPadding --&gt;\n\t\t\t\t\t\t\t&lt;\/div&gt; &lt;!-- end .portfolio --&gt;\n\t\t\t\t\t\t\t&lt;div class=&quot;portfolio&quot;&gt;\n\t\t\t\t\t\t\t\t&lt;div class=&quot;portfolioPadding&quot;&gt;\n\t\t\t\t\t\t\t\t\t&lt;a href=&quot;f4p.html&quot;&gt;&lt;img src=&quot;images\/bodyworks.jpg&quot; alt=&quot;Image of Bulletproof Designs&quot;\/&gt;&lt;\/a&gt;\n\t\t\t\t\t\t\t\t&lt;\/div&gt;&lt;!-- end .portfolioPadding --&gt;\n\t\t\t\t\t\t\t&lt;\/div&gt; &lt;!-- end .portfolio --&gt;\n\t\t\t\t\t\t\t&lt;div class=&quot;portfolio&quot;&gt;\n\t\t\t\t\t\t\t\t&lt;div class=&quot;portfolioPadding&quot;&gt;\n\t\t\t\t\t\t\t\t\t&lt;a href=&quot;f4p.html&quot;&gt;&lt;img src=&quot;images\/bulletproofScreenshot3.jpg&quot; alt=&quot;Image of Bulletproof Designs&quot;\/&gt;&lt;\/a&gt;\n\t\t\t\t\t\t\t\t&lt;\/div&gt;&lt;!-- end .portfolioPadding --&gt;\n\t\t\t\t\t\t\t&lt;\/div&gt; &lt;!-- end .portfolio --&gt;<\/code><\/pre>\n<p>I need to make it so I have &lt;div class=&#8221;portfolio&#8221;&gt; added to each item.<\/p>\n<p>I have it like this at the moment but it only puts it around the whole of the content<\/p>\n<pre><code>&lt;div class=&quot;portfolio&quot;&gt;\n\t\t\t\t\t\t&lt;div class=&quot;portfolioPadding&quot;&gt;\n\t\t\t\t\t\t\t&lt;?php the_content(); ?&gt;\n\t\t\t\t\t\t&lt;\/div&gt;&lt;!-- end .portfolioPadding --&gt;\n\t\t\t\t\t&lt;\/div&gt;&lt;!-- end #portfolio --&gt;<\/code><\/pre>\n<p>I know I can add HTML to the content in WordPress but if it&#8217;s for a client and they don&#8217;t understand HTML, it&#8217;s not the right way to do it.<\/p>\n<p>How do I go about adding classes around lots of elements in the content?<\/p>\n<p>Thanks<\/p>\n<p>Josh<\/p>\n","protected":false},"template":"","class_list":["post-3437199","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3437199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3437199\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=3437199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}