ikaring
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Issue with Pretty Permalinks and the “Post Page” settingLoop should be something like this, in page-blog.php:
<?php $args = array( 'posts_per_page' => 10, // Number of posts per page 'cat' => 1, // Category id/ids 'post_type' => 'post', ); $the_query = new WP_Query( $args ); if ( $the_query->have_posts() ) { while ( $the_query->have_posts() ) { $the_query->the_post(); ?> <h3><?php the_title(); ?></h3> <?php } } wp_reset_postdata(); ?>There is a way to use pre_get_posts filter hook, but leave that for now.
Just for ref.
https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_postsForum: Developing with WordPress
In reply to: Issue with Pretty Permalinks and the “Post Page” settingNo.
Standard loop in page template wont get category blog posts.
You need to use WP_Query or something to get blog posts.
Using query_posts is not recommended.Forum: Developing with WordPress
In reply to: Issue with Pretty Permalinks and the “Post Page” settingIf ‘blog’ is a custom post type, pls check it has ‘has_archive’ option as true.
Forum: Developing with WordPress
In reply to: Issue with Pretty Permalinks and the “Post Page” settingWell, I dont think body_class emit page slug like ‘blog’, unless you set it to.
Like so:
<body <?php body_class( 'blog' ); ?>>Since deleted category archive page for ‘blog’ category (https://www.kiranmillwoodhargrave.co.uk/category/blog/) worked fine (
seemed like to me), I doubt your template for blog ‘page’.
How do you query blog posts in the page?Forum: Fixing WordPress
In reply to: wordpress admin account deletedHow did you delete the only admin account?
BTW, there are some info to create user via phpMyAdmin.- This reply was modified 6 years, 9 months ago by ikaring.
Forum: Fixing WordPress
In reply to: WP in subdirectory: Keeping old homepageHi.
Is there a problem copying your non-WordPress homepage content to your theme’s home.php or front-page.php?
Forum: Developing with WordPress
In reply to: Issue with Pretty Permalinks and the “Post Page” settingHi.
It seems you have page ‘blog’ and category ‘blog’?
You can have same slug for page and category, but it causes conflict when slug is used for permalinks.Forum: Fixing WordPress
In reply to: Posts Page – Category filter not workingHave you clicked ‘Filter’ button? Just to be sure.
How about clicking on category name text link in each posts?Forum: Developing with WordPress
In reply to: Showing category image with title and descriptionHi.
I dont know about the plugin, but there are document about usage of it.
https://wordpress.org/plugins/taxonomy-images/I think the section “WORKING WITH ALL TERMS OF A GIVEN TAXONOMY” has some
hint for you.Forum: Fixing WordPress
In reply to: Responsive Portrait View IssueHi.
It seems you have set additional css as following:.front-page img { padding: 5px 0 5px 0 !important; }Change padding to 0, or add additional rule, like so:
.front-page .ls-container img { padding: 0 !important; }Forum: Fixing WordPress
In reply to: Adding a Secondary PostHi, I think it is custom post type(CPT) what you want to achieve with.
There are many plugins to set CPT, but I usually use Custom Post Type UI.
https://wordpress.org/plugins/custom-post-type-ui/They have lots of options but just change ‘Has Archive’ setting to ‘True’ when adding new post type for now.
This enables to have archive page for the new post type.Do not forget to delete herbalife-content page you have now.
Forum: Fixing WordPress
In reply to: Changing WP language settings also changes “html lang” attributeHi. Easy fix is to add these lines in wp-config.php according to ref page in japanese (https://firegoby.jp/archives/2404):
if (preg_match('/^\/wp\-admin/', $_SERVER['REQUEST_URI'])) { define('WPLANG', 'en-US'); } else { define('WPLANG', 'de-DE'); }However, this fix left adminbar in de-DE, he saids.
To fix adminbar to be en-US while frontend html in de-DE, activate switch-lacale.php plugin hosted in gist and set
define('SITE_LANG', 'de-DE');in wp-config.php as frontend html lang.It is an old post, so I dont know if it works now.
Hope this helps.Forum: Fixing WordPress
In reply to: Resize Medium size existing imagesI would use command line tool, wp-cli, but you can use plugins like
Search Regex.Forum: Fixing WordPress
In reply to: Resize Medium size existing imagesIt has delete unused size images feature now.
I would search-replace file names after regenerate them.Forum: Developing with WordPress
In reply to: Custom wp_query questionHi.
How about make a parent page for a series of a sermon?
Then exclude child pages for Sermon archive page, like so'post_parent' => 0.