Čistit napadený WordPress není nic příjemného, většinou se to řeší obnovením ze zálohy. To ovšem znamená, že musíte mít funkční zálohu z doby, kdy WordPress byl ještě v pořádku. Spousta malware se však snaží skrýt svou přítomnost, co možná nejdéle, popřípadě provádí neplechu někde na pozadí. Po několika týdnech, tak už zálohu nenapadené verze mít nemusíte. Je tak dobré sledovat varovné signály, že něco není v pořádku.
Rubrika: Programování Strana 21 z 24
HTML, CSS, PHP, MySQL, Javascript, JQuery, Wordpress …
This should work when added to your functions.php
:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
function includepage_func( $atts ) { $atts = shortcode_atts( array( 'id' => -1, 'name' => '?' ), $atts, 'includepage' ); if ($atts['id'] != -1) { $wp_query_parameters = "page_id=" . $atts['id']; } else { $wp_query_parameters = "pagename=" . $atts['name']; } $recent = new WP_Query($wp_query_parameters); while($recent->have_posts()) { $recent->the_post(); $pagecontent = "<h3>" . the_title('', '', FALSE) . "</h3>" . get_the_content(); } } add_shortcode( 'includepage', 'includepage_func' ); |
In your page/post, use it like this:
[includepage id=59]
OR
[includepage name=about]
https://coumiwp.cz/010-jak-vyuzit-funkci-multisite-kterou-wordpress-trochu-skryva/
https://wp-admin.cz/jak-na-nastence-v-redakci-zobrazit-rozepsane-clanky/
If you happen to develop sites for your clients in WordPress it is worth taking a few extra steps to customise the WordPress admin. Thankfully WordPress comes with lots of built in hooks to make this super easy.
Seems like an effective way to write a job ad. pic.twitter.com/Zdq7dND5LT
— Marc G Gauthier (@marcgg) October 13, 2016