Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • You can set up the block and cover either in a page or in a template, depending on your needs:

    • In a Page: If you want a unique layout for a specific page (like the homepage), you can directly add and configure the blocks in that page.
    • In a Template: If you want a consistent layout across multiple pages (e.g., all blog posts or specific sections of your site), setting it up in a template would be better. This allows you to maintain a uniform design throughout your site.

    Choose the option that best fits your design goals!

    Using a Plugin

    You can also use a plugin like Username Changer:

    1. Install and activate the Username Changer plugin.
    2. Go to Users > Your Profile and you’ll see an option to change your username.

    To auto-insert footnotes in the block editor after a CSV import:

    1. Pre-process the CSV: Modify your post content in the CSV to include footnote block syntax (e.g., <!-- wp:footnote -->).
    2. Use a Plugin: Consider using plugins like Modern Footnotes to handle [footnote] syntax automatically in the block editor.
    3. Custom Script: Write a custom PHP script to replace footnote markers (e.g., [1]) with the proper footnote block structure during import.

    These approaches will let you avoid manually adding footnote blocks after import.

    These approaches will help, just like my approach with the (Calcvat uk) site:

    • This reply was modified 1 year, 7 months ago by calc20.

    With WordPress 5.9 and its duotone updates, the CSS and SVG for duotone filters are indeed no longer output globally but only for the pages where they’re used. Since you’re using duotone in a custom hover effect on archive pages and this has broken after the update, you’ll need to ensure the duotone CSS and SVG are available globally (or for the relevant pages). Here’s how you can fix it:Steps to Fix Duotone in Archive Pages

    1. Manually Add Duotone SVGs and CSS: You can manually add the duotone SVG filters to your theme, ensuring they are available on all pages (including archives). You can use the wp_get_duotone_filter_svg function to retrieve a specific duotone filter’s SVG and then output it where needed.Example:phpCopy code// Add to your theme's functions.php or appropriate file function mytheme_add_duotone_svg_to_footer() { // Replace 'duotone-class' with the specific duotone class you're using echo wp_get_duotone_filter_svg( 'duotone-class' ); } add_action( 'wp_footer', 'mytheme_add_duotone_svg_to_footer' ); This will ensure that the duotone SVG is available in the page’s footer.
    2. Manually Enqueue Duotone CSS: Similarly, you can enqueue the specific duotone CSS globally or for the relevant pages. WordPress handles this dynamically for images, but if you need it specifically for your hover effects, you can enqueue the relevant styles yourself.phpCopy codefunction mytheme_enqueue_duotone_styles() { if ( is_archive() ) { wp_enqueue_style( 'mytheme-duotone-style', get_template_directory_uri() . '/css/duotone.css' ); } } add_action( 'wp_enqueue_scripts', 'mytheme_enqueue_duotone_styles' ); In the CSS file (duotone.css), add the specific duotone class and filter rules for your hover effect.
    3. theme.json Solution: If you’re managing styles through theme.json, you might need to ensure the duotone settings are correctly configured to output across your theme. You can try adding the duotone classes to the styles section in theme.json:jsonCopy code{ "styles": { "blocks": { "core/image": { "duotone": [ { "slug": "duotone-class", "colors": ["#333", "#fff"] } ] } } } }
    4. Use wp_footer_assets Filter: Another approach is to hook into wp_footer_assets to ensure the duotone styles are loaded for all pages where you need them.phpCopy codefunction mytheme_output_duotone_styles() { if ( is_archive() ) { // Add specific duotone CSS or SVG here echo '<style>.wp-block-image img { filter: url(#your-duotone-filter); }</style>'; } } add_action( 'wp_footer_assets', 'mytheme_output_duotone_styles' );

    By adding the SVG filter manually and making sure the correct CSS is applied to your hover effect, you should be able to restore the broken functionality in archive pages.

Viewing 4 replies - 1 through 4 (of 4 total)