automattic / underscores.me Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://underscores.me
License: GNU General Public License v2.0
Home Page: https://underscores.me
License: GNU General Public License v2.0
I run the underscores.me website and I generate pretty cool WordPress themes.
On underscores.me landing page, with code (inside html) I found that structure:
<div id="main">
<div id="primary" class="site-content">...</div>
</div>
If I'll download generated theme zip - code are reciprocal:
<div id="content" class="site-content">
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">...</main>
</div>
</div>
and don't have <section>
selector.
I'll could create Pull request for this.
For textdomains, spaces should be replaced by hyphens rather than underscores.
Just noticed it when generating Wu Wei
. Did this change recently? :)
Reported here: Automattic/_s#312
I have created the new theme using this command wp scaffold _s test-theme --theme_name="Test Theme" --author="Me"
after installing the theme I found wrong changelog detail in the readme.txt also found the wrong versioning as compared to stable tag on the file.
The changelog date should the same date when theme installed and they changelog tag should same as the stable tag.
Check the below screenshot.
In this commit: Automattic/_s@118dc76, extras.php was replaced with template-functions.php. We should update homepage.php to be consistent with the new file name.
I'm noticing the casual use of query_posts()
in the templates.
Interestingly, https://codex.wordpress.org/Function_Reference/query_posts clearly states this should NOT be used in themes and plugins.
Please clear this up.
Is the Automattic team pushing us int this direction?
Is the linked article inaccurate in stating the query should be reset after called?
On a freshly installed wordpress version the custom header image is not displaying at all.
This is taking the conversation over here Automattic/_s#659 to underscores.me and hopefully kicks off the things discussed. I thought I'd start the ball rolling with a speed mockup session. This is just a short rough idea but hopefully means we can have a starting point.
A few points:
Search and replace for WordPress.com features is broken.
See: Automattic/_s#229
When using WP-CLI or wget to download a theme from underscores.me like this:
wp theme install http://underscores.me/?underscoresme_generate=1&underscoresme_name=SITENAME
or
wget -O kansasfpc.zip http://underscores.me/?underscoresme_generate=1&underscoresme_name=SITENAME
It doesn't work. I get the following error message:
Warning: The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature
Any thoughts? I was hoping to really automate my jumping-off process, but this is a bit of a hurdle.
This is more of a suggestion/idea instead of an issue report, so I hope this is the right place to put this.
Since Automattic is working hard on their AMP for WordPress plugin, and Gutenberg is going to be stock WordPress come 5.0, I think it would be great if Underscores had an "Add AMP Native Support" and an "Add Gutenberg Support" to the advanced options dropdown when creating a new Underscores package.
The "Add AMP Native Support" option could generate an Underscores bundle with the appropriate add_theme_support( 'amp' )
code, as well as generate AMP HTML theme templates and support for an AMP compatible mobile navigation using the AMP Bind functionality instead of the JS version, etc.
The "Add Gutenberg Support" Will, of course, add the appropriate theme support for image sizes and maybe an example editor custom color pallet, along with a blank editor.css stylesheet enqueued and ready to go.
I think Underscores is one of the best starter themes out there since it is based off of WordPress Standards and maintained by Automattic. And since WordPress is wanting to champion Gutenberg and AMP for the future, having a simple starting point for people to start utilizing them would be a huge step forward. I think Underscores would be the best place to do that.
See Automattic/_s#1129 /cc @obenland
GiHub limited the amount of items returned for our contributor API call and offers pagination. At some point we'll have to adopt this in order to show all contributors.
See https://developer.github.com/guides/traversing-with-pagination/
Just a little thing, these <li>
s are not getting closed. Not a big deal as the browser will try to correct it but may cause weird issues on edge cases.
underscores.me/inc/template-tags.php
Line 64 in d1953c7
and
underscores.me/inc/template-tags.php
Line 70 in d1953c7
So apparently when using Underscores with Woo boilerplate, WooCommerce use of (most likely) wp_get_attachment_image_src() WP function is disabled, this makes stuff pretty messy when dealing with product catalogues and it's image scaling cross devices.
I can re-enable the default WooCommerce stylesheet by removing the following line from woocommerce.php:
add_filter( 'woocommerce_enqueue_styles', '__return_empty_array' );
However this is not a recommended practice, as already noted in the comments.
Upon reading https://docs.woocommerce.com/document/image-sizes-theme-developers/, at ### #section-4 there seems to be a filter workaround, more specifically I would need the filter 'single_product_archive_thumbnail_size', however this seems not to work and right below it, it says the following:
Note: The hooks listed above are used by WooCommerce core. If a theme has custom template files or uses it’s own functions to output images, these filters may not be in use.
So it is either me not getting something due to my limited knowledge or indeed there is no template in use/or other functions are used to output images when using the WooCommerce boiler plate with _s.
"We can make an exception for this on Underscores.me" -- is this possible?
From a SEO and security perfective it would be good to force HTTPS only access.
Would be great to add an image upload field to the Advanced Options section so that users have the option to include a screenshot image when creating a new theme.
As discussed in Automattic/_s#1149 (comment) we should look how the style.css
can be dynamically be generated from the Sass.
Consider using semantic versioning for the versioning within the generated theme file (from plugins/underscoresme-generator/underscoresme-generator.php) instead of a regular 1.0.
Semantic versioning encourages theme authors to consider the implications of incrementing the version number, notably when usage changes or content would be display significantly differently/not at all upon upgrade.
For those that don't use semantic versioning, they could continue to just increment the primary number.
Hello everybody. I have a problem with the my theme, help me please!!! Two days I can not understand what's the matter. Familiar with underscores and WordPress well - created a lot of custom themes. But at the moment I'm stuck - I had a problem with the theme for the artist's site, which I started developing recently. I will try to clarify the essence:\
There are different types of pages in my template. The home page has a separate template, and several more pages will have their own templates. The problem is that all pages except FrontPage (home) displays content from index.php. It doesn't matter if I specify my own template for page, or default template - page always use the index.php template.
It seems that WordPress does not see the template for pages.
I tried to switch to standard WordPress themes (twentytwenty) - everything works as it should.
At first I thought maybe I made a mistake. I looked through all the files of the theme 10 times - I didn't find any errors.
The idea crept in that something was wrong with directly from underscores.
Then I generated a new theme at https://underscores.me/ - did not make any changes to the theme files, the result - the same error (pages are displayed with index.php). I installed the new WordPress and repeated the procedure again, to be sure. The result is the same, in the theme I created and a clean theme from underscores.me pages are displayed with index.php, and on native WordPress themes (like twentytwenty, twentynineteen) everything is fine - pages content displays from page.php.
I can't understand what the mistake is. Maybe I don't see something banal, I missed it? Maybe there is some incompatibility with the latest version of WordPress?
Here is some screenshots:
Static home page
Simple page:
Sorry for my English, i still learning
I'm new to the forum. Long story short, I got ripped off by a webdesign company and now I'm trying to put my site together from what I have saved/backed up, I imported it to a godaddy wordpress hosting and I think I have it up and running but I seem to have some images missing in some pages but not in others (my home page). Certain pages (Home page) my background image shows but when I click a product and it takes me to a product page I do not have the background image like I use to. I'm not a webdesigner/builder but I manage to learn many things along the way. Can someone please help?
The Text Domain
is using the theme name instead of the theme slug.
You can see this with e.g. Random Theme
.
I get Text Domain: Random Theme
instead of Text Domain: random-theme
Firstly - I just wanted to say thanks for underscores, I love it! Secondly sorry if this doesn't make sense - it's right at the edge of my knowledge and I've been googling this for an hour and it still makes little sense.
If I edit page.php and paste in some text using an editor I get funny characters instead of apostrophes.
Wordpress is set to utf8 and I can confirm that that meta tag is in there. The response header is Content-Type text/html; charset=UTF-8.
The only thing not set to php is the actual php file itself. When I edit this it says it is saved as ANSI. Re-saving as utf8 fixes.
So if the file should be utf8 shouldn't the files I download from your generator be utf8? Or am I missing something.
Thanks again
Hi,
I always use Underscore for my wordpress development. I just want ask you that in your template-tags.php the function posted_on() is function stepup_posted_on() {
$time_string = '%2$s';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string .= '%4$s';
}
$time_string = sprintf( $time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
$posted_on = sprintf(
_x( 'Posted on %s', 'post date', 'stepup' ),
'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
);
$byline = sprintf(
_x( 'by %s', 'post author', 'stepup' ),
'<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span>'
);
echo '<span class="posted-on">' . $posted_on . '</span><span class="byline"> ' . $byline . '</span>';
}
endif;
And in the fornt end it shows the Post date. I just want to add the_category(); instead of post date. I am trying hard to do that. But am unable, can you please guide me how would I do it?
Thanks in advance.
I am listed as contributor in repo https://github.com/Automattic/_s/graphs/contributors but my profile is not displaying in http://underscores.me contributors list.
Although the critical alerts have nothing to do with the theme, there are quite a few warnings on deprecated code: http://themecheck.org/score/wordpress_theme_underscores_me.html
When we generate theme, two dot files are also there. May be we need to exclude those as we have excluded other dot files.
Hey all!
Is there a reason the bootstrap grid is not part of the sass files? I was using the regular bootstrap then decided I wanted to use the sass for variables and poof! The grid was gone. Did I miss something?
Thanks in advance,
Christina
If we generate theme on http://underscores.me then the generated theme pot file has name _s.pot. i think it should have name theme-name.pot
So, is this abandoned or i'm missing something? All files are 4 years old.
Thanks.
The first step everybody does is probably to lower the version of the downloaded theme to 0.1.0
I think this task could be done when you download a new theme from underscores.me, in the case you want to keep to version on the repository to 1.0.0. Otherwise, we could simply lower the version to 0.1.0.
What are your opinions?
Same things should by applied to components.underscores.me / theme-components repository.
Moved over from Automattic/_s#1128.
Currently the script and style handles are being replaced with the theme name, not the theme slug ( Step 4 in the manual: "Search for _s-
to capture prefixed handles.").
Something like this should fix it (untested):
$contents = str_replace( "_s-", $this->theme['slug']. '-', $contents );
The theme/inc/woocommerce.php file could use some compatibility updates for WC 3.3+
See: https://github.com/woocommerce/woocommerce/wiki/Declaring-WooCommerce-support-in-themes
Namely should remove loop_shop_columns
and loop_shop_per_page
filters and use new theme support options for those.
Hi guys, relatively new wordpress developer here.
How can I add my own unique pages to my site? Is the same as I normally would do, through Custom Page Templates?
Hello,
I am a web developer, and I am starting to use Wordpress for my clients. I am loving this starter theme, but I am trying to figure out how to customize the Blog Post Index, since I edit home.php, I also edit the index.php as well. I just want to customize the blog index page. Any help, would be appreciated.
Relating to: Automattic/_s#567 over at _s, this is an issue to look at adding Genericons as an option when downloading _s.
Hi All,
The _sassify! checkbox on the site's advanced options for generating your theme doesn't appear to be working for me. When I select the option the generated .zip still only contains .css files and no SASS.
I have tested on chrome & firefox and always just get the plain .css version of underscores not the lovely sassified version :(
The basics this should include are:
I personally do not feel this needs complex diagrams. We can do this simply. This comes from the following ticket:
If you use the sassify
option when creating a new theme, the theme headers only get replaced in style.css
, not in sass/style.scss
I haven't checked this yet, but _s
now contains a phpcs.xml.dist
file with references to the name _s
as well, so I'm wondering if the generator handles this case.
See: https://github.com/Automattic/_s/blob/master/phpcs.xml.dist#L36
When you are looking at the main menu in a narrow browser window such that the "Primary Menu" button is visible, then click on the menu to toggle the hidden list below. Then, if you resize the browser window with the menu open, the css causes the button not to display, so the user can't click to close the open menu. Screenshots on a recent project based on underscores attached.
See: Automattic/_s#808
Specifically: https://cloud.githubusercontent.com/assets/1828768/9420739/61d85384-4869-11e5-80f0-d709fc4e6b8a.jpg
Line 6 of skip-link-focus-fix.js
should not get replaced.
Could we go wp_script_add_data( 'html5shiv', 'conditional', 'lt IE 9' );
?
As per the following pull request:
#37
Title says it all.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.