Archived

This topic is now archived and is closed to further replies.

  • 0

How can i change the display order of elements in boxes

Question

Posted · Report post

I am working on a simple responsive page with four columns that goes down to three, two and one as the window narrows and i am using boxes to ultimately display 40 items on the home page. i have one row of four items, and so far so good. The problem I'm having is that instead of having the photo on the top (or to the side) i want it full width in the box, but want a small heading (which I'm using the title for at present), an H2 and an H3 on top of the photo and then the text paragraph below. I have been trying some css relative positioning hacks to achieve this, but beyond being way non-semantic, i also am finding that the elements that are now outside of the box (above) are not visible, even though i can inspect them in chrome. is there a way to create a custom version of a "box" with the elements that I need in the order I need them? I'm sure I can solve the visibility issue by pushing everything down instead of up, but that doesn't solve the semantic problem and i'm afraid it will break in IE 7, for instance. Please help!

Share this post


Link to post
Share on other sites

5 answers to this question

Posted · Report post

following your advice (i think!) i am trying to modify a copy of the boxes section into a new section called Story Boxes. I went through the section.php file and prefixed all of the instances of "box" or Boxes" with "Story" or "story-" or story_" or "story" as seemed appropriate and i got the following errors on the page options setup page. can you help me debug these? Warning: call_user_func() expects parameter 1 to be a valid callback, class 'StoryBoxes' does not have a method 'pagelines_default_boxes' in /Applications/MAMP/htdocs/wordpress/wp-content/themes/pagelines/includes/class.types.php on line 196 Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/wordpress/wp-content/themes/pagelines/includes/class.types.php:196) in /Applications/MAMP/htdocs/wordpress/wp-includes/option.php on line 563 Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/wordpress/wp-content/themes/pagelines/includes/class.types.php:196) in /Applications/MAMP/htdocs/wordpress/wp-includes/option.php on line 564

Share this post


Link to post
Share on other sites

Posted · Report post

OK, I figured out how to hunt down these bugs and worked through a bunch more, but now I have a different problem: I am modifying a copy of the boxes section and i want to add two new fields (post objects) to the post type: ruberics and overheads. i have succeeded at geting them to show up in the meta, but i cannot get them to actually show up on the page. I'm sure I'm missing (or mis writing) something simple. Here is the code I have for the draw story boxes function: function draw_story_boxes($p, $args){ setup_postdata($p); $oset = array('post_id' => $p->ID); $story_box_link = plmeta('the_story_box_icon_link', $oset); $story_box_icon = plmeta('the_story_box_icon', $oset); $story_box_target = (plmeta('the_story_box_icon_target', $oset)) ? 'target="_blank"' : ''; $story_box_ruberic = plmeta('the_story_box_ruberic', $oset); $story_box_overhead = plmeta('the_story_box_overhead', $oset); $class = ( plmeta( 'story_box_class', $oset ) ) ? plmeta( 'story_box_class', $oset ) : null; $story_box_ruberic = sprintf('

%s
', $story_box_ruberic); $story_box_overhead = sprintf('

%s

', $story_box_overhead); $image = ($story_box_icon) ? self::_get_story_box_image( $p, $story_box_icon, $story_box_link, $this->thumb_size, $story_box_target) : ''; $title_text = ($story_box_link) ? sprintf('%s', $story_box_link, $p->post_title ) : $p->post_title; $title = do_shortcode(sprintf('

%s

', $title_text)); if(plmeta('story_box_more_text', $oset)){ $more_text = plmeta('story_box_more_text', $oset); } elseif(ploption('story_box_more_text', $this->oset)){ $more_text = ploption('story_box_more_text', $this->oset); }else $more_text = false; $more_link = ($story_box_link && $more_text) ? sprintf('%s', $story_box_link, $story_box_target, $more_text) : ''; $more_link = apply_filters('story_box_more_link', $more_link); $content = sprintf('
%s %s %s
', do_shortcode($p->post_content), pledit( $p->ID ), $more_link); $info = ($this->thumb_type != 'only_thumbs') ? sprintf('
%s%s
', $title, $content) : ''; return sprintf( '
%s%s
', 'fstorybox_'.$p->ID, $class, $this->thumb_type, $image, $info ); } I just have this on my local server right now. Let me know if having it on a live server would help. Thanks.

Share this post


Link to post
Share on other sites

Posted · Report post

HI, Unfortunately, at this moment in time PHP isn't my forte or it is, if you would like me to nuke your server :D Therefore, I have bookmarked your topic and I will speak to one our developers and see if they can assist.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi,

Just a follow up, would it be possible to post your code into our paste service, as it has become mangled with our migration to a new forum.

http://paste.pagelines.com/

Share this post


Link to post
Share on other sites

Posted · Report post

Hi, I think the simplest way for you to achieve this would be to use the PageLines Grid system, this way you will have more control over the layout. http://demo.pagelines.me/tools/

Share this post


Link to post
Share on other sites