✍️
Writing
I craft actionable content, develop performance-driven WordPress plugins, and help further bitcoin education. ⚡️
-
forgemedia LLC
- Scottsdale, AZ
- https://forgemedia.io
- @brianleejackson
Pinned Loading
-
WordPress custom post type template....
WordPress custom post type template. Source: https://woorkup.com/wordpress-custom-post-type/ 1add_action( 'init', 'your_prefix_register_post_type' );
2function your_prefix_register_post_type() {
3$args = [
4'label' => esc_html__( 'artists', 'text-domain' ),
5'labels' => [
-
Remove base slug from custom post ty...
Remove base slug from custom post type URL. Source: https://woorkup.com/wordpress-custom-post-type/ 1function na_remove_slug( $post_link, $post, $leavename ) {
23if ( 'artist' != $post->post_type || 'publish' != $post->post_status ) {
4return $post_link;
5}
-
Enable custom post type WordPress pr...
Enable custom post type WordPress preview. Source: https://woorkup.com/wordpress-custom-post-type/ 1//adds custom post type query var to preview links
2function mycptname_cpt_previow_query_vars($link, $post) {
3$custom_post_types = array('artist');
4if(in_array($post->post_type, $custom_post_types)) {
5return add_query_arg(['post_type' => $post->post_type], $link);
-
Enable WordPress block editor suppor...
Enable WordPress block editor support on custom post type. Source: https://woorkup.com/wordpress-custom-post-type/ 1'show_in_rest' => true,
-
GeneratePress author sidebar widget ...
GeneratePress author sidebar widget box as seen here: https://woorkup.com/ 1<center><img src="https://domain.com/bio-pic.png" class="no-lazy" width="175" height="175" alt=""></center>
2<div style="background:#FAF3D4; color: #5d5b54; margin: 15px 0; padding: 1em 1em; border-width: 0 0 0 12px;"><strong style="font-size:19px;">Hi there, I'm {name}. <a href="https://twitter.com/username" target="_blank" style="border-bottom:0px; color:#504e48;" rel="noopener noreferrer"><i class="fa fa-twitter fa-2x;" aria-hidden="true"></i></a></strong><br
3/><span style="line-height:23px;font-size:18px;">Write something about you. <strong><a style="color:#504e48; border-bottom: 2px solid rgba(80, 78, 72, 0.2);" href="https://domain.com/about/">Read more</a></strong></span></div>
-
Exclude logo (desktop and mobile) fr...
Exclude logo (desktop and mobile) from lazy load in GeneratePress theme with Perfmatters plugin. Source: https://perfmatters.io/docs/lazy-load-wordpress/ *Update* This is no longer needed as you can add class exclusions in Perfmatters. 1//add no-lazy class to primary logo
2function wpd_generate_logo_output($output, $logo_url, $html_attr) {
34//add our no-lazy class
5$html_attr = str_replace('class="', 'class="no-lazy ', $html_attr);
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.