Allow users to give a dashboard widget a custom name using ACF

add_action( ‘wp_dashboard_setup’, ‘feed_dashboard_add_widgets’ ); function feed_dashboard_add_widgets() { $title = __( ‘My title’, ‘textdomain’ ); //by default title // if ACF is activated (prevent fatal) end your field not empty, define a new $title if ( function_exists( ‘get_field’ ) && ! empty( get_field(‘my_widget_name’ ) ){ $title = get_field(‘my_widget_name’ ); } wp_add_dashboard_widget( ‘dw_dashboard_widget_feed’, $title, ‘my_cool_widget’); }

Add checkbox in admin post list – show checked post in widget

To get you started: <?php /* Plugin Name: The Checkbox Plugin Plugin URI: https://www.yourawesomedomain.de/plugins/ Description: A plugin with a checkbox to mark posts. Version: 0.0.1 Author: bjovaar Author URI: https://www.bjovaar.maybe/ License: GPL2 License URI: https://www.bjovaar.de/disclaimer Text Domain: bjovaar Domain Path: /languages */ if(!defined(‘ABSPATH’)) { exit(‘No access’); } // This path variable can be used for … Read more

Permalinks Question: Adding a prefix ONLY in front of the posts

1) Add this rewrite at the end of you function.php function add_rewrite_rules( $wp_rewrite ) { $new_rules = array( ‘YOUR_PREFIX/(.+?)/?$’ => ‘index.php?post_type=post&name=”. $wp_rewrite->preg_index(1), ); $wp_rewrite->rules = $new_rules + $wp_rewrite->rules; } add_action(“generate_rewrite_rules’, ‘add_rewrite_rules’); function change_blog_links($post_link, $id=0){ $post = get_post($id); if( is_object($post) && $post->post_type == ‘post’){ return home_url(‘/YOUR_PREFIX/’. $post->post_name.”https://wordpress.stackexchange.com/”); } return $post_link; } add_filter(‘post_link’, ‘change_blog_links’, 1, 3); 2) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)