Single Page theme [closed]

There are plenty of one page themes for WordPress _ here’s a recent link to some of them >>> https://colorlib.com/wp/best-one-page-wordpress-themes/ _ and another one with one page themes that are free >>> https://www.codeinwp.com/blog/free-one-page-wordpress-themes/ i suspect you might be looking for more detail about ‘customizable’ but you would need to clarify your question by giving a … Read more

create a template page for a post

You can add a rewrite tag and rules that capture anything after the post name: function wpd_add_rewrites(){ add_rewrite_tag( ‘%my_page%’, ‘(.+)’ ); $post_types = array( ‘movie’, ‘book’, ‘album’ ); foreach( $post_types as $post_type ){ add_rewrite_rule( ‘^’ . $post_type . ‘/([^/]*)/([^/]*)/?’, ‘index.php?post_type=” . $post_type . “&name=$matches[1]&my_page=$matches[2]’, ‘top’ ); } } add_action( ‘init’, ‘wpd_add_rewrites’ ); Don’t forget, you … Read more

How can I pass get_the_author_meta(‘user_email’) through the REST API?

Why I Don’t Have Access to Post’s Information? When you are using Admin-AJAX or the REST API, you will only have access to the current user’s data (by that I mean by default, such as using is_user_logged_in()). To retrieve any other information, you have to pass it as an argument in your AJAX request. WordPress … Read more

Password Protected Page Title

You don’t want to translate the title, so there’s no need to use __() here and you won’t translate ‘%s’, because that’s a placeholder. add_filter( ‘protected_title_format’, ‘remove_protected_text’ ); function remove_protected_text() { return ‘%s’; } should work.

the_excerpt producing empty output

Does the_excerpt() work if you remove the custom functions you have? Firstly, for sanities sake to make sure the excerpt has a value, could you try replacing your current excerpt call with this? <?php echo get_post_field(‘post_excerpt’, $post->ID); ?> If it does work then the problem is most likely related to your custom functions.

Use the_title_attribute() for the WHERE parameter in a page template

Answer provided by @Howdy_McGee who commented on the question. Using the prepare statement allowed the results to be pulled at the correct time and using %s is for strings and %d would be for a decimal or number value. $sql = $wpdb->prepare(“SELECT * FROM <databaseName>.<tableName> WHERE name=”%s””, get_the_title()); $results = $wpdb->get_results($sql, OBJECT);

OptimizePress Theme Overriding add_filter page_template

Had to switch the filter to the template_include hook. Don’t know if that is the correct way to do it, but it works: function _plc_template_include ($template) { $pages = _plc_get_custom_pages(); foreach ($pages as $slug => $title) { if (is_page ($slug) && is_file (PLC_TEMPLATES . $slug . ‘.tpl.php’)) { ob_start(); include PLC_TEMPLATES . $slug . ‘.tpl.php’; … Read more

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