how to make a portfolio page with sidebar?
-
That can be done, but it does take some coding knowledge. Here are the steps to point you in the right direction:
– making a child theme so your changes aren’t overwritten the next time you update the theme
– adding a new widgetized area to the theme
– creating a new sidebar template file
– creating a custom page template based on your portfolio template, but that calls in your new sidebarIf I will not update the template sketch, how I change the code what make a portfolio page with sidebar? Please tell me the simplest solution
What add in this file “fullwidth-page.php” for make a portfolio page with sidebar?
There isn’t an easy solution to what you’re trying to accomplish – you’ll need to work through the steps I already provided.
For step 4 above, have a look at the two existing templates in Sketch:
content-portfolio-single.php
content-portfolio.phpif I replace contents in file “fullwidth-page.php” from standard template WordPress?
this file “fullwidth-page.php” responsible for portfolio page?
this file “fullwidth-page.php” responsible for portfolio page?
No, it’s not. See the files I referenced above.
which of these files (content-portfolio-single.php, content-portfolio.php)
is responsible for the page if it looks like http://arhitektor.esy.es/portfolio/sobor2/?If you view the browser source on that page you’ll find this line:
<body class="single single-jetpack-portfolio postid-71 custom-background">
That means it’s the file single-jetpack-portfolio.php that’s generating that page.
I added sidebar (http://arhitektor.esy.es/portfolio/sobor2/), but I don’t no how reduce width for picture and text
You’re partially there, but it looks like you haven’t set up a child theme, which is step 1 in the list above. This means that all your changes will be wiped out and overwritten when you update the theme. I’d strongly suggest you set up a child theme so this doesn’t happen, and move your changes there.
You can target the width of the main column with something like this:
.single-jetpack-portfolio .entry-content { width: 600px; }
Adjust the number to whatever you like. You’ll also need to float your new sidebar to the right of the main content.
Here are some beginner resources for CSS and HTML to help you learn more about how to customize your layout as you like:
https://dailypost.wordpress.com/2013/07/25/css-selectors/
http://dailypost.wordpress.com/2013/06/21/css-intro/
http://dailypost.wordpress.com/2013/08/29/css-matched-rule-pane/
.single-jetpack-portfolio .entry-content {
width: 600px;
}
Where is it written? In single-jetpack-portfolio.php or other files?Hi, that is CSS. You would want to add that to your custom CSS.
If you have not yet done so, I would suggest creating a child theme so that any customizations you make will not be overwritten by a future theme update. Alternately you can use the Edit CSS function in the Jetpack plugin, or use one of the other Custom CSS plugins that will keep CSS changes from being overwritten.
Child Themes
Child Theme creation plugins
Jetpack plugin
Custom CSS pluginsI do not want creating a child theme.
.single-jetpack-portfolio .entry-content {
width: 600px;
}
Where is it write?Contents of the file “single-jetpack-portfolio.php”:
[ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]
<?php /** * The Template for displaying all single posts. * * @package Sketch */ get_header(); ?> <div id="primary" class="content-area"> <main id="main" class="site-main" role="main"> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', 'portfolio-single' ); ?> <?php // If comments are open or we have at least one comment, load up the comment template if ( comments_open() || '0' != get_comments_number() ) : comments_template(); endif; ?> <?php endwhile; // end of the loop. ?> <?php get_sidebar(); ?> <?php sketch_portfolio_pagination(); ?> </main><!-- #main --> </div><!-- #primary --> <?php get_footer(); ?>
Please, help
Since you’re already using Jetpack, an easy way to add custom CSS is to activate the Custom CSS module. You’ll then add your custom CSS in the new stylesheet editor that’ll appear in your dashboard, under Appearance > Edit CSS.
- The topic ‘how to make a portfolio page with sidebar?’ is closed to new replies.