How can I edit a blog specific sidebar? - wordpress

Website I'm referring to: http://www.csolsinc.com/blog/
The sidebar on this page is different than the non-blog pages on the website. I've looked around the coding (it's a Wordpress site), and I'm not entirely sure where to locate how to edit the code specifically in that sidebar?
Any tips?

The code specific to the single blog posts resides in the single.php file of the theme. Look for something similar to get_sidebar() in that file.
If you're talking about the actual blog archive page, the code can be found in the page.php file of your theme.
If you're looking to add/remove widgets to the sidebar, login to the site backend and navigate to Appearance > Widgets.

Related

WordPress blog finding related PHP

I am trying to edit a WordPress site. When I try to edit the x.com/blog/ page nothing happens.
I am trying to find out which PHP files are related to set up the blog page, but I do not know how.
If I can find the right files I can edit those. So how can I edit the /blog page in Wordpress?
Open Admin Dashboard and edit page blog page and check which template is currently using for that page.Then go to "/wp-content/themes/[your-theme-name]/" and find that template.
https://developer.wordpress.org/themes/template-files-section/page-template-files/
Alternative you can check if x.com/blog/ is coming from archive page which is custom post type page. You can find it via go to "/wp-content/themes/[your-theme-name]/archive-blog.php"
https://codex.wordpress.org/Post_Type_Templates
Go to /wp-content/themes/[your-theme-name]/. All files which are responsible for rendering the output can be found there.
Most likely index.php, home.php, front-page.php or page.php are responsible. The exact responsibility depends on the structure of the used theme.
Simple drop a
echo "This file is used currently.";
into the top of those themes and check if this appears in the source code if you are reloading the page.
Also make sure that any caching plugins are temporarily deactivated.
The basics on how WordPress themes are made and which template part is called can be found here: https://codex.wordpress.org/Theme_Development

how do nopCommerce list pages in the footer from a theme

I downloaded a theme off the NopCommerce site. The footer list some basic pages but there are some missing. For example: the "About us page" I can see from the admin end that these are pages that you can change the text for but the new theme just doesnt have them.
Is there a way to turn on and off page visibility or do i have to edit the root layouts in the source code to display links for these pages?
If your theme doesn't include a link to the page, there's a good chance you'll have to add to the HTML yourself. Fortunately, its not difficult at all.
This is where the About Us link is in the Default template
\Views\Common\Footer.cshtml (Line 19)
<li>#T("AboutUs")</li>
Paste that line into your downloaded theme's footer file to get the About Us link to show up. If your theme follows a similar file structure as NopCommerce's Default Template, the file you'll need to edit should be at
\Themes{your-downloaded-theme-name}\Views\Common\Footer.cshtml

How to locate file of wordpress page

I am a real newbie with wordpress. I need to quickly find out the filename for a particular url.
Let's say my URL is
http://example.co.uk/account/membership-levels/
Where will the .php or .html file most likely be? In themes folder?
w
Thanks for your help.
Wordpress doesn't have a 1:1 relation between content and templates. On some minimalist themes you could have a single php template in your themes folder (wp-content/themes/themename/single.php) to display all your articles.
Depending on your permalink structure, that link you are asking about is probably rendered using the page.php template, and if it isn't, then single.php should be the one. The only reason for editing a template is when you need to change the structure of all your posts. If you only need to edit one particular post or page, then you should just edit the content.
To edit the content, you need to log into your dashboard (wp-admin) and look for that entry among the pages or posts section.
Many themes will show an edit icon next to the posts title if you read it while logged on your dashboard, so you can skip searching for it in the backend.

Wordpress Templates aren't showing up on my Page Options

I'm working on my first WordPress project. It won't be a blog but a CMS to quickly edit content and pages on the site.
I've got the header and footer exactly how I want it by editing them in the Appearance -> Editor menu. Under this menu I see quite a few templates that I could use (screen shot http://i.stack.imgur.com/P7IyY.png), some of which I don't even think I'll need or know where they came from. However when I edit my pages and go to the Page Attributes section there is only an option for 1 template (screenshot http://i.stack.imgur.com/UblzD.png). If I select Default Template as my template for the page, only the header and footer seem to load.
I am pretty new to WordPress. Am I suppose to 'activate' these templates somewhere? I only plan to use a handful of them (index pages, contact pages with a sidebar). What am I missing?
Thank you!
You should take a look at the information posted in the WordPress Codex on template files and the like. This image is particularly helpful in getting an understanding for when certain files are used by the WordPress engine to render pages WordPress Template Files Diagram.
You'll find the rest of the information relating to that diagram on this page.
I experienced this issue when using a child theme. I added a new template file to the child theme but the "templates" dropdown did not show on the page options section of any of my pages. I checked and double-checked the formatting of the template file and that was not the issue.
It turns out that my styles.css document in the child theme was not formatted properly and was missing the "template" attribute that designates the parent theme being extended with the child theme. I update the child theme css document to reference the parent template and voila! The template dropdown showed as expected.

static pages on wordpress

How do I build static pages on wordpress?
I use wordpress, and it keeps looking like a blog, with a navigation bar on the side which I don't like. I want a "static website" like look. with articles, not blog posts.
You have to create a theme for that. In your theme you can make it look like anything you want. If you're blog is on wordpress.com just pick a theme from the gallery.
or if you host your own blog, you can download any of the free themes or make your own! It's pretty easy.
These links should help
http://codex.wordpress.org/Theme_Development
This is a pretty huge question. Very open-ended.
The layout of your site (looking like a blog vs. a static site) is entirely dependent on your theme.
An easy way to get started is to use the default twentyten theme, and add widgets to your sidebar (WP admin > Appearance > Widgets). This will stop the default sidebar from displaying.
Next, you can create a static page in WP Admin > Pages and then use that page as your default page, WP Admin > Settings > Reading > Front page displays...
From there on out, it's really a matter of making your theme look like you want it to. f there's something that WordPress can't do out of the box, search Google or the WordPress Plugin Repository for what you want to do.

Resources