Avatar of APD Toronto
APD TorontoFlag for Canada

asked on 

Customizing WordPress

Hi Experts,

How do I customize WP? More specifically, I added a few pages, placed the Pages menu on the left, but I just want to decrease to horizontal space for the menu, and add it to the content?

Thank you.
WordPressPHPCSSHTMLWeb Development

Avatar of undefined
Last Comment
APD Toronto
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Most "look and feel" customizations are accomplished via editing the theme's style.css file.  

If possible, use a child theme:

https://codex.wordpress.org/Child_Themes
https://codex.wordpress.org/CSS
Avatar of APD Toronto
APD Toronto
Flag of Canada image

ASKER

I am using Twenty Fifteen Theme, so how do I do this?
The instructions are in the WordPress Codex link I posted above:

https://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme

Basically, you create a new folder in wp-content/themes.  Then create a style.css file in that new folder and add the following code to the file:

/*
 Theme Name:   Twenty Fifteen Child <-- CHANGE THIS TO WHATEVER
 Theme URI:    http://example.com/twenty-fifteen-child/ <--- CHANGE THIS TO YOUR FOLDER NAME
 Description:  Twenty Fifteen Child Theme
 Author:       John Doe
 Author URI:   http://example.com <--- CHANGE THIS TO YOUR SITE
 Template:     twentyfifteen
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
 Text Domain:  twenty-fifteen-child
*/

Open in new window


If you want the theme to use the base TwentyFifteen style, create a new file in your child theme folder called functions.php and add this code to it:

<?php 
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );

}

Open in new window


That imports the base CSS from the TwentyFifteen parent.  You can also copy/paste the CSS from the parent to the child instead.
Avatar of APD Toronto
APD Toronto
Flag of Canada image

ASKER

Is the Theme URI important,l as I'm developing it on localhost,
Avatar of APD Toronto
APD Toronto
Flag of Canada image

ASKER

I did the steps above and see "Twenty Fifteen Child" blank theme, but now what?
Is the Theme URI important,l as I'm developing it on localhost,

Not really.

I did the steps above and see "Twenty Fifteen Child" blank theme, but now what?

Make the child theme your active theme and add/change the CSS as desired.
Avatar of APD Toronto
APD Toronto
Flag of Canada image

ASKER

What I meant regarding the URI, is that the address will change. For example, I changed the installation folder and all CSS is disabled.

Regarding the child theme, now I have activated the CSS file is empty. What do I add in order to reduce the gap between the side bar and content?
ASKER CERTIFIED SOLUTION
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of APD Toronto
APD Toronto
Flag of Canada image

ASKER

Sorry, I needed to go out of town for emergency.

I added #sidebar and it adjusted a sub-section of the menu, but I cannot find the primary container, which hold sidebar.

From the image attached, I would like the left-hand bar (white part) to be 1/3 of what it is now, and the content to be right next to it glued with no gray area.

This is my css so far

/*
 Theme Name:   Twenty Fifteen Child
 Theme URI:    http://localhost/wordpress0/wp-content/themes/twentyfifteen-child/
 Description:  Twenty Fifteen Child Theme
 Author:       John Doe
 Author URI:   http://example.com
 Template:     twentyfifteen
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
 Text Domain:  twenty-fifteen-child
*/
#sidebar{
	width: 150px;
}
article{
	position: relative;
	top: 0px;
	left: 150px;
}

Open in new window

Capture.JPG
Avatar of APD Toronto
APD Toronto
Flag of Canada image

ASKER

No definite solution.  Will re-post at later date.
PHP
PHP

PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.

125K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo