Access methods in plugin template

Normally not (it depends on what part of the plugins code you want to use and how the plugin initializes itself in the context in which you want to do it), the main plugin files are loaded as part of the wordpress boot process and the convention is that they will load the other files … Read more

Locating the template behind a WordPress Page

Just an idea – have you tried putting something like this: <?php if ( current_user_can(‘manage_options’) ) { echo get_option(‘current_page_template’); } ?> You may be able to put it in the header so admins can see the template names of every page – although without testing I’m not sure – may have to go in the … Read more

How to set custom homepage via a plugin

You can replace the homepage template via plugin like this: // Filter to replace the template of the home page add_filter( ‘template_include’, ‘replace_home_page’ ); function replace_home_page( $template ) { if ( is_front_page() ) { return plugin_dir_path( __FILE__ ) . ‘new_template.php’; } return $template; } src/read more

the_content() not showing full posts in category template

Try this <?php global $post; ?> <article id=”post-<?php the_ID(); ?>” <?php post_class( ‘entry’ ); ?><?php echo et_fable_get_background(); ?>> <div class=”container clearfix”> <header class=”entry-title”> <?php if ( is_single() ) : ?> <h1><?php the_title(); ?></h1> <?php else : ?> <h2> <a href=”https://wordpress.stackexchange.com/questions/208008/<?php the_permalink(); ?>”><?php the_title(); ?></a> </h2> <?php endif; ?> <?php //et_fable_post_meta(); ?> </header> <?php if ( … Read more

Cant pull in featured Image

You won’t get anything back from your template simply because the loop returns what is in the main query object for that specific page. To see what is actually in the main query object, you should do var_dump( $wp_query ); outside the loop. To display custom content on a page template, you will need to … Read more

WooCommerce – Print Processing orders [closed]

Here’s the solution: Remove the SKU table header Add (SKU) to the Product header Product (SKU) pass false, true in email_order_items_table function $order->email_order_items_table(false, true) This is not the visual result you were expecting, but it works and it shows the SKU. The second parameter in email_order_items_table indicates whether to show the SKU or not.