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.

Retrieve a custom form field modified by a filter

I figured out how to proceed. I created a text file with the desired select options and just replaced the input field from the template with the bellow code. <?php $file_path=”FILE_PATH_HERE”; // path to the file with select options if ( !file_exists( $file_path ) ) { echo ‘<input type=”text” name=”location” placeholder=”‘ . __(“Location …”, “custom-settings”) … Read more

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