0
votes

I am very new to Wordpress and I just like to ask a fundamental question about its structure.

I understand that Wordpress uses different files as templates for different sections or types of pages. What I'd like to know is what if I have certain parts within the page that contains other bits of data like in the image below (the ones with the question marks):

enter image description here

Let's say, referring to the image above, that the 3 boxes in a row will display reviews and the 2 boxes in a row at the bottom will display just random quotations. These boxes have their own styling and the content would be dynamic. It would be quite straight forward if they were static (I just copy paste the HTML code) but it's making them editable via Wordpress that I'm not sure how to go about.

Note that these sections are not performing any special function but rather, just displaying content (title, text or image).

I guess my question boils down to:

How do I create any custom section I want in a Wordpress page and make them editable / dynamic?

Reading up a bit, I came across concepts like: widgets, custom fields, and meta boxes. But I'm not exactly sure which one of these is the best tool or if there are better ones.

2
Posts or Custom Post Types fill that space. You need one normal loop or multiple custom loops to add content there. - brasofilo
Custom post type code generator This will help you a little bit. - user985818
There are multiple possible solutions to your question, I personally would use custom loops for the reviews and custom fields for the quotations.. WordPress can display random posts but it creates a huge load for the db. Custom meta boxes are just a prettier way to display custom fields in the admin. You could also make it deadly simple and just put widgets everywhere.. It really depends on what makes your life easier.. - antonio83

2 Answers

0
votes

As you are saying you are new to wordpress. Don't worry we are here to help you. You can ask any kind of questions here. We will help.

As you asking about pages in the wordpress, we divide a page into for hections and all the sections are called by us according to our needs. top part is a header part all the info you want to show in the header you can place in the header.php, sidebar content you can plzce in the sidebar.php, and place footer content in th footer.php, and place you body content in wordpress admin. there is a post.php which is comman file to all the pages. when you create any page then it have comman page to show its content in the browser. You can edit you page.php to change the layout of you page. and if you want to call any widget then you can call it in any where in the page.

if any thing is not clear then you can ask again in detals.

Thanks for posting a question.

0
votes

so when your working with a custom page in wordpress.

  • First you will need to create a template file for the custom page in your theme folder. Save the file as template-portfolio.php for example.

  • The following code is needed to display the new page layout in the dashboard.

  • Template Name: Portfolio * */
  • Next you will add your page structure

                            <a class="thumbnail" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
                            <?php the_post_thumbnail(); ?>
                            </a>
                    <?php the_content(); ?>
    
                    </div>
                    <?php endwhile; ?>
    
    
                <?php wp_reset_postdata(); ?>
    
            <?php else : ?>
                <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
            <?php endif; ?>
    
    
    </div><!-- .row -->
    

  • Save the file.

    From the dashboard go to the pages tab, create a new page. On the right side select the template Portfolio. Add images and content.