Use bbPress.
Tech Tag: WordPress
-
The future of WordPress is block-based themes
The future of WordPress is indeed leaning heavily towards block-based themes, driven by the evolution of the Gutenberg editor and the broader shift towards a more flexible and user-friendly content management experience. Here’s a closer look at what this means for WordPress:
(more…)in WordPress -
I’m trying Block Based Checkout with WooCommerce, but it says it’s not supported by PayPal. Do you know when it will be available?
It’s good to look here.
https://github.com/woocommerce/woocommerce-paypal-payments/issues/211It doesn’t seem to be supported at the moment. However, I wonder if it will be supported when WooCommerce Blocks becomes part of WooCommerce rather than a separate plugin.
in WordPress -
Plugin to change the font of WordPress articles
You can do this with the Fonts Plugin | Google Fonts Typography plugin. Please note that the site will be slightly slower since you will be using web fonts. If you don’t want your site to slow down, consider manually hosting fonts on your site.
in WordPress -
Security settings to protect important WordPress files
To protect important files such as wp-config.php, it is recommended to install “All In One WP Security”.
in WordPress -
[WordPress] How to create a sitemap to submit to Google Search Console
You can use the Rankmath plugin.
in WordPress -
[Forum spam prevention] Set to apply to become a member of BuddyPress
The convenient point of including BuddyPress is in the “membership application” section. If you only use bbPress, new members cannot join unless you allow user registration, but if you set up the BuddyPress member participation requests, you can accept requests to join the forum even if you turn off “Allow anyone to register” on the WordPress side. You will have to manually approve members, but this will help prevent most spam registrations.
in WordPress -
How to register your site or blog with Google
You can do this by registering your site with Google Search Console (GSC) and submitting a sitemap.
in WordPress -
[Cocoon] Display a custom taxonomy if the currently displayed custom post type post has a custom taxonomy.
Cocoon uses nesting as a PHP structure, so it won’t work if you just modify single.php. First, copy single.php in the parent theme, place it in the child theme, change the file name to single-custom-post-type-name.php, and edit the following parts of the content. This will separate the behavior for custom post types.
<?php //Post page content cocoon_template_part('tmp/single-contents-Custom-post-type-name'); ?>
After that, create a folder called tmp in the child theme, duplicate the parent theme’s single-contents.php, place it in the child theme’s tmp folder, name it single-contents-custom-post-type-name.php, edit the following parts of the content. This is also one of the mechanisms to separate the behavior for custom post types.
<?php //Body template cocoon_template_part('tmp/content-Custom-post-type-name') ?>
After that, copy the parent theme’s content.php, place it in the child theme’s tmp folder, name it content-custom-post-type-name.php, and add the following part anywhere.
<?php //Custom taxonomy categories/tags below the main text $post_type = get_post_type(); $taxonomies = get_object_taxonomies($post_type, 'objects'); $has_terms = false; if (!empty($taxonomies)) { foreach ($taxonomies as $taxonomy) { $terms = get_the_terms(get_the_ID(), $taxonomy->name); if ($terms && !is_wp_error($terms)) { $has_terms = true; // Show taxonomy name echo '<h3>' . esc_html($taxonomy->label) . '</h3>'; echo '<ul>'; foreach ($terms as $term) { $term_link = get_term_link($term); if (!is_wp_error($term_link)) { echo '<li><a href="' . esc_url($term_link) . '">' . esc_html($term->name) . '</a></li>'; } else { echo '<li>' . esc_html($term->name) . '</li>'; } } echo '</ul>'; } } } ?>
By the way, I decided to put the above code directly below the code below.
<?php //Categories/tags below the main text if (is_category_tag_display_position_content_bottom() && is_single()) { cocoon_template_part('tmp/categories-tags'); } ?>
-
How to install bbPress with block-based themes.
If you use bbPress in a block-based theme like Twenty Twenty Four, the screen will become completely white. As a temporary solution, it seems that you can fix it by installing and configuring the bbp style pack.
The setting method is below.
- Install and activate bbp style pack.
- Go to Theme Support tab, turn on Enable advanced FSE theme support and save.
- Create a dummy page
- Create a new page at Dashboard > Pages > Add new. You can give this page a title of your choice. It is not possible to have a slug set in Forums, Forums, Topics, Replies, or Dashboard > Settings > Forums > Slug.
4.1. Enter data on the page
This page can be designed to contain any content, but requires one block, which is a shortcode block. That block is,[bbp-forum-index]
shortcode.
4.2. Forum pattern
There are two patterns available that allow you to easily add left and right sidebars.Add a block by clicking + on a page’s block
Select a pattern (middle of Blocks | Patterns | Media)
Select “bbp Style Pack Forum Pattern”
Choose left or right sidebar version
Once added, you can easily change the widgets to display, the displayed content, and change the column width.5. For more information about the block widgets available within the Style Pack plugin, see the Block Widgets tab.
6. Configure advanced theme support and configure template pages
In the settings above, click the “Enable advanced FSE theme support” selection.
With the above settings, set “bbPress template page for advanced FSE theme support” to the page set in 3. above.in WordPress