Jump to content


Photo
- - - - -

How to Add New Post Objects to a Custom Section in a Child Theme


This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1 akosner

akosner

    Newbie

  • Members
  • 6 posts

Posted 08 September 2012 - 01:59 PM

I don't see this documented anywhere. I am trying to make a custom version of boxes and to add a couple of extra heading levels and change the order that the elements are displayed. I have successfully gotten the new elements to show up on the meta settings, but not in getting them to be visible on the page. Can you describe the steps necessary (in section.php and elsewhere if necessary) to "register" new section elements within a custom section? (note, the url above is from the standard pageline theme without the custom "boxes." I am developing the child theme locally, but I can put it online if that will make it easier to diagnosis. I think that I have a general, and universally useful, question here, so please respond ASAP.)

#2 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts

Posted 08 September 2012 - 04:47 PM

It seems you're trying to things the hard way. Let's try it a bit easier. 1. For order of boxes, you might want to try the Boxer plugin which uses Content Blocks in place of boxes. This gives you several advantages over standard boxes and allows you to determine the box order internally. Post Types Order, another option, can affect other things, so use that as a last resort. 2. For added headings within box content area, create a custom div or class. Wrap the 2nd and 3rd titles in the divs or classes and then write the styling in Custom Code > CSS Rules. So:
The Second Title
A Third Title
Then, some CSS like: .my2ndboxtitle {font-size:16px; color:#C00000; line-height:18px; font-weight:bold;} Makes the font 16px high, colored red, with 18px line height (puts 1px space above and below by default) and make the font bold. .my3rdboxtitle {font-size:11px; color:#1B1BE0; line-height:13px; font-style:italic;} Customize as you wish.

#3 akosner

akosner

    Newbie

  • Members
  • 6 posts

Posted 08 September 2012 - 07:22 PM

Do you mean the WP Boxer plugin (through wordpress.org, not through the pagelines store?) with this method, would i just have a content block with a loop inside it and then use the boxer plugin to pull in posts? Would the divs just go in the body of the post, or can i set up meta input fields (or custom fields) for them?

#4 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts

Posted 08 September 2012 - 08:20 PM

Yes, the WP Boxer plugin. I use that plugin to pull posts from other parts of my site. If you want to do that, then you also get Special Recent Posts plugin; customize the shortcode you can create with that and place the shortcode inside the Boxer content (edit) area. See an example at

Please Login or Register to see this Hidden Content

On that site, I actually use an RSS feeder, but the premise is the same.

#5 akosner

akosner

    Newbie

  • Members
  • 6 posts

Posted 08 September 2012 - 08:45 PM

So I can make a short code with the Special Recent Posts plugin that would pull all of the posts in a category and then make a content block for each category? how do you get the content blocks into the pagelines content area?

#6 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts

Posted 08 September 2012 - 09:03 PM

Okay, let me start from scratch, with apologies for my lack of clarity. The WP Boxer plugin uses a content block which is essentially a box. It uses sets, so like a box-set you'd have a content block set. Then, you'd create page and enter some simple shortcodes there with the box sets you want on the page. You can have quite a few. Then, in the Content Blocks setting, you create your 'box'. Add the title, image; set the alignment, font, font size, and the block order, etc. Save. Go to Special Recent Posts website where you'll find information about the shortcodes. Yes, you can set a shortcode to select X number of posts from Y category with or without thumbnail, etc. That shortcode is placed inside the edit area of the Content Block and saved. On the page you've created, you can now see the boxes (content blocks) in the desired order, each with the preferred content from the category's posts, such as thumb, title, excerpt, link, etc.