So you have changed the style of your WordPress child theme in style.css
and see the changes on your WordPress website. But the style of the block editor remains the same when you are creating or updating your posts or pages.
Rubrika: WordPress Strana 2 z 10
WordPress je svobodný open source redakční publikační systém napsaný v PHP a MySQL a vyvíjený pod licencí GNU GPL. Je oficiálním nástupcem systému b2/cafelog a má širokou uživatelskou a vývojářskou komunitu. Dle oficiálních statistik je používán jako CMS (z anglického content management system – systém pro správu obsahu) na více než 25 % webových stránek na světě a překonává tak open source CMS jako Joomla či Drupal, které se drží pod třemi procenty.
How to add custom block editor css in WordPress
(Jak přidat vlastní css editoru bloků do WordPressu)
RSS zdroj vašeho oblíbeného kanálu Youtube není z nějakého důvodu u kanálu uveden a těžko se hledá. Můžete si pomoci tímto hackem:
https://www.youtube.com/feeds/videos.xml?channel_id=id_kanalu
Za id_kanalu
dosaďte jeho skutečné id, které je uvedeno v adrese kanálu za channel/
, tedy v tomto případě z adresy https://www.youtube.com/channel/UC4ghMQ16P3acuKKXHTtkS7w
je id kanálu UC4ghMQ16P3acuKKXHTtkS7w
.
Další možnosti najdete v tomto článku.
V některých případech, když potřebujete změnit překlad nebo přeložit textový řetězec, není vhodné zasahovat do pluginu, šablony nebo jádra. Jednodušším způsobem pak může být úprava překladu pomocí vlastní funkce.
WordPress parametry v url automaticky „odstřihne“. Je třeba přidat do functions.php
:
1 2 3 4 5 |
function parameter_queryvars( $qvars ) { $qvars[] = 'yourvarname'; return $qvars; } add_filter('query_vars', 'parameter_queryvars' );<code> |
a následně v šabloně použít:
1 2 3 4 |
global $wp_query; if (isset($wp_query->query_vars['yourvarname'])) { print $wp_query->query_vars['yourvarname']; // něco udělej } |
From wordpress 5.0, new visual editor called Gutenberg Editor will be installed as default visual editor of wordpress. (It can be available by activating Gutenberg plugin in wordpress 4.9.) And it can make us add cover image block (background image block) from visual editor. Here, we will explain how to add parallax effect to background image added by Gutenberg.
As the WordPress Gutenberg block editor evolves, new features are being added to make content creation easier. And block patterns may just be the most exciting addition for both web designers and their clients.
Celý článek
The Gutenberg block editor for WordPress has changed how we create content within the CMS. But it’s also opened up some new possibilities on the front end as well.
You can redirect all your WordPress pages to a designated Coming Soon page for all non-logged in users with the template_redirect action hook whilst leaving all pages visible to logged in users.
1 2 3 4 5 6 7 |
add_action( 'template_redirect', 'themeprefix_coming_soon' ); function themeprefix_coming_soon() { if( !is_user_logged_in() && ! is_front_page() || is_home() ){ wp_redirect( site_url() ); exit(); } } |
So if the user is not logged in and the page is not the home page then redirect the user to the home page, if you want a different page to direct them to, change the parameters as below.
1 2 3 4 5 6 7 |
add_action( 'template_redirect', 'themeprefix_coming_soon' ); function themeprefix_coming_soon() { if( !is_user_logged_in() && !is_page('comingsoon') ){ wp_redirect( site_url('comingsoon') ); exit(); } } |
So above the as long as the page is not ‘comingsoon’ the non-logged in user will be redirected to it.
WordPress sends a few emails out from a website including password reset emails that have a from email address wordpress@yoursite.com they also have a from name of WordPress.
Two WordPress filters can change these values wp_mail_from and wp_mail_from_name – add the below code in your child themes functions.php and change the appropriate values.
1 2 3 4 5 6 7 8 9 10 11 |
add_filter('wp_mail_from', 'prefix_email_from'); // Change default WordPress from email address function prefix_email_from( $new_email ) { return 'admin@newadress.com'; // Change email address } add_filter('wp_mail_from_name', 'prefix_name_from'); // Change default WordPress from name function prefix_name_from( $new_name ) { return 'Company Name'; // Change from name } |
You could also bring in option values already created in the Settings > General page and use the Blogname and Admin Email values…
1 2 3 4 5 6 7 8 9 10 11 12 13 |
add_filter('wp_mail_from', 'prefix_email_from'); // Change default WordPress from email address function prefix_email_from( $new_email ) { $admin_email = get_option( 'admin_email' ); return $admin_email; } add_filter('wp_mail_from_name', 'prefix_name_from'); // Change default WordPress from name function prefix_name_from( $new_name ) { $blogname = get_option( 'blogname' ); return $blogname; } |
According to our latest poll, so far the votes are pretty much split on whether people love, hate, or don’t care about WordPress‘ new Admin Bar. Over time, it looks like „Hate it“ has started to pull ahead, but it doesn’t matter because the Admin Bar Toolbar is here to stay, regardless of opinion. Already there are many awesome ways to make it do virtually whatever you want. So that’s the deal, and in this DigWP post, we round up a ton of tips, tricks, and plugins for ultimately mastering the WordPress Admin Bar.