ThePixelMe
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Yuuta] Anchor links & menuYou can add a javascript snippet to close it, like it:
(function($) { var menuLink = $('.main-navigation a'); var siteNavWrapper = $('.site-navigation-wrapper'); menuLink.on('click', function() { siteNavWrapper.removeClass('is-visible'); }); })(jQuery);Note: you need to enqueue that snippet after jQuery because it relies on jQuery lib.
Forum: Themes and Templates
In reply to: How can I remove featured image in single postYou can add this to your custom CSS area or child-theme CSS file:
.single-post .post .featured-image { display: none; }Forum: Fixing WordPress
In reply to: Expandable/collapsible Posts?A good example of what I mean is at wuxiaworld.com
Okay, so we want:
— get the categories
—- get the posts inside each category (maximum of 2)
——get the excepts for each post.default state of posts is hidden; only show when their category is clicked.
.
And the code references for each of those:
— get_categories ()
—- get_posts()
——the_except()and we can use some basic css + javascript for the hide/show thing
.
As for the foreach loop, just nest your posts’ foreach loop inside your categories’ foreach loop, like so:
foreach($categories as $category) { // some stuffs here foreach($posts as $post) { // some stuffs here } }Not as complicated as it seems.
.
.
Here’s a demo I made, in case you need a working, basic example:
I grabbed the default theme Twenty Sixteen and created a child-theme call Twenty Sixteen Child. Then I create a custom page template call
tpl-test.phpto test this out. Here are the codes:custom.js — basic scripts to add/remove class on click (to hide/show content)
functions.php — enqueue the parent theme & enqueue child-theme’s custom.js
styles.css — child-theme name and some basic styles
tpl-test.php — where the main codes for expandable/collapsible posts lies.
And the result: http://i.imgur.com/VwDEwxo.gifv
This is just the barebone version, but it can get you started.
Forum: Themes and Templates
In reply to: [Theme: Swell Lite] Move comment form to topShort version, if you’re already familiar with coding:
You create a child theme –> copy comments.php file from your parent theme to your child theme –> move the
<?php comment_form(); ?>line to where you want the comment form to appear (right above the comments, in this case)..
Long version, with more details, in case you aren’t familiar with coding:
Step 1
Go to Plugins –> Add New –> search for Child Theme Configurator –> install & activate that plugin [screenshot]Step 2
Go to Tools –> Child Themes –> Select Create New Child Theme –> hit Generate Child Theme Files button [screenshot]Step 3
Go to Appearance –> Themes –> activate your new Swell Lite Child theme (not Swell Light, make sure that it’s Swell Lite Child)Step 4
Go to Tools — Child Themes –> click on Files tab –> in parent templates section, select comments & hit Copy Selected to Child Theme button [screenshot]Step 5
Go to Appearance –> Editor –> make sure that you’re editing the Swell Lite Child theme in the Select theme to edit box –> choose Comments.php file –> highlight<?php comment_form(); ?>line (it should be at the end of the comments.php file, scroll down to see it) –> right-click and cut it (cut, do not copy, because if you copy, you’ll end up with 2 comment forms on your site) [screenshot]Step 6
still in the same file, now scroll up and paste it wherever you want (for example, right below the// you can start editing hereline) [screenshot]..
And viola, you’re done! Your comment form is now above comments. [screenshot]
Forum: Themes and Templates
In reply to: MENU (Please make them in the middle)You can add these to your custom CSS area or your child-them CSS file:
For the menu tabs:
.pws_tabs_controll { text-align: center; }For the content inside the tabs:
.pws_tab_single { width: 100%; }Forum: Themes and Templates
In reply to: [Enigma] Decrease the width of the pageOh hey, fellow Vietnamese! Mình cũng là người Việt đây! 😀
.
Anyhow, back to business:
If you only need to limit the width of your slider, you can add this to your custom CSS area or child-theme CSS:
/** * Change slider width */ #myCarousel { width: 100%; /* default to 100% of max-width, good for responsive */ max-width: 1140px; /* maximum width, if you need to change, change this number only, don't touch the other 2 lines of codes */ margin: 0 auto; /* center the slider */ }If you need to limit the width of the entire site on larger screen, you can add this:
/** * Change site to box-model */ body > div { width: 100%; /* default to 100% of max-width */ max-width: 960px; /* if you need to change site-width, just change this number; leave the rest alone */ margin: 0 auto; /* center the site */ } /** * Change container to fluid model */ .container { width: 100% !important; }Forum: Everything else WordPress
In reply to: self storage websiteI’m going to base this reply off the site at https://www.storquest.com/ that you’ve linked in your original post.
All I see on that site is a theme, some contact forms, and a store locator. It isn’t very complicated. About 1 or 2 weeks for design, then 2 or 3 weeks for coding, plus 1 week for QA/bug fixes, it’s possible to finish something like that in around 4 to 6 weeks.
.
Theme
The theme should be custom coded. You can base it off Underscores Starter Theme (it’s pretty much the official starter theme for WordPress) or Genesis Framework (if you’re into dealing with child themes).Don’t use a pre-made theme. Only when dealing with low-budget projects (around $1000 or $2000 USDs) should we resort to a pre-made themes; they’re bad news in general.
Since you’ve never mention the budget in your original post, I’ll assume that the client has adequate budget–around $10000 to $15000 USDs. That’s enough to build a custom theme for the client.
.
Plugin
Store locator plugin — If you Google/Bing search for “WordPress store locator plugin” (without the quotes), I’m sure you’ll find many plugins to use.
Advanced Custom Field (Free or Pro) — Your client will need to edit the content of the site without your help. And this makes it easy for you to implement custom fields for those content.
Contact Form 7 (free option) or Gravity Form (paid option) — That example site has many contact forms. Anyone of these would satisfy that need.
Also, Redux Framework is an option if you wish to give your client some control over the theme, but I generally dislike allowing the client too much control over the theme. They’ll ruin it. Better to not allow them those customization in the first place.
.
That’s pretty much it.
This is what I see if I apply that code to your site: [screenshot]
So unless I’ve misunderstood something, that code does what it should when applied correctly: It moves the site-content a bit to the right to make some space, and extend the width of the sidebar to 180px.
Try copy the entire code block without leaving out a single character and put it at the bottom of the custom CSS area or child-theme CSS file.
Color background
I have by Custom CSS the color of the letters already in white, but I don’t get the background in black..I have this: .page{
background-color:#000000;
}I got a part of the background of the site in black, maar as you see, i part stays in white, how can I change that?
You missed the background-color of several other elements:
.site, .site-content .entry-header, .site-content .entry-content, .site-content .entry-summary, .page-content { background-color: #000; }Size sidebar:
I want to change the widht of the sidebar. It must by widhter, because I want my opening hours on the same rule and now it is on 2 rules.
This will work, see the css comments to see which block of codes does what:
@media screen and (min-width: 1008px) { /* move site-content a bit to the right to leave room for larger sidebar */ .site-content { margin-left: 240px; } /* increase width of sidebar */ #secondary { width: 180px; } }Forum: Themes and Templates
In reply to: Please someone help with CSSHow do I move it to the left?
This should work:
@media screen and (min-width: 61.5625em) { body:not(.search-results) article:not(.type-page) .entry-content { float: none; width: 100%; } }The
float:noneline of code moves it to the left.The
width:100%line of code extends the width of your blog posts to 100% of its container (default is 71.42857144%).This should work:
div.widget_search button[type="submit"] { background: #37474F !important; }Forum: Themes and Templates
In reply to: [Theme: divi] Why is my site so slow?If you’re on a cheap shared hosting plan, then it’s also possible that you might be having a “noisy neighbor.” So After you’ve tried everything you could think of and it’s still slow, you probably should consider switching to a better server.
Providers with cheap shared hosting plan (the $5 or $8 USDs a month type) might put anywhere between 500-15000 websites on each of their server. This doesn’t mean customers, of course, just websites (because some people might have multiple websites), and many of which are probably inactive.
In your case, you’re sharing resources with around 600-1000 other sites. If any of these site suddenly pickup traffic or run something that eats up a lot of resources, then your site would suffer.
We don’t know for sure, of course, since only the hosting provider have solid numbers and can monitor their server’s resource allocations. But “noisy neighbor” is certainly a possibility there.
Forum: Themes and Templates
In reply to: [Pixova Lite] Centering "What We Do"Just add font-size to that code, like this:
#intro h4 { text-align: center; font-size: 24px; }Change the number as you see fit.
Forum: Themes and Templates
In reply to: [Athena] Change colour on Header text on SliderOn sample page this is “Welcome to Athena” text…
You can add this to the custom CSS area or child-theme CSS file:
#athena-jumbotron h2.header-text { color: #36B3A8; }Forum: Themes and Templates
In reply to: [Twenty Sixteen] Header Image AlignmentYou can add this to your custom CSS area or child-theme’s CSS:
/** * Make header image and header menu * stay side-by-side, each take 50% of container's width */ .site-header-main { float: right; /* stick header menu container to the right */ max-width: 50%; /* limit menu's width to 50%, giving the other 50% to header image */ } .header-image { clear: none; /* remove parent clearing to work with header menu's float */ max-width: 50%; /* limit image's width to 50% of the container, giving the other 50% to header menu */ } .site-header { clear: both; /* clear header menu float */ }