Choose to show or not show title on a template?
Choose to show or not show title on a template?
Choose to show or not show title on a template?
How to update permalink on the fly?
The Solution is: every normal character stored in weird starts with &# ends with ; like this ٪ So you can simply 1-open you dreamweaver 2- new HTML file 3- code tab 4- delete all the code in it 5- put one weird code like this ٪ 6- design tab 7- you can see the … Read more
Custom field in title
You have two problems. First need to global $wpdb;. Then you are using the_title() and the_permalink() both of which automatically echo out a value. So you need to switch them to get_the_title() and get_permalink(). function get_post_by_alphabet($the_char){ global $wpdb; $first_char = $the_char; $postids=$wpdb->get_col($wpdb->prepare(” SELECT ID FROM $wpdb->posts WHERE SUBSTR($wpdb->posts.post_title,1,1) = %s ORDER BY $wpdb->posts.post_title”,$first_char)); if ($postids) … Read more
Since individual entries in taxonomies are terms, the template tag for displaying them, used between the_title() and the_content() hint-hint, would be the_terms() 🙂
I recently ran into a similar issue (rather tackling how to reset slugs that are dirty after importing). This is a snippit of the code I used to reset the slugs: $wpdb->update( $wpdb->posts, array( ‘post_name’ => sanitize_title( $post_to_fix->post_title ) ), array( ‘ID’ => $post_to_fix->ID ), array( ‘%s’ ), array( ‘%d’ ) ); Primarily focus on … Read more
Ok, I found the method by myself. This is the code: //… elseif (is_page() || is_single()) { //Page and Post Title global $post; $metatitle = get_post_meta($post->ID, ‘metatitle_value_key’, true); if ($metatitle) { echo stripslashes($metatitle); } else { the_title(); } } elseif (is_home()) { //Using is_home for the blog page //And using get_queried_object $page_object = get_queried_object(); $metatitle … Read more
Filter wp_title, get the current page title from your external app, and return that title. Sample code: add_filter( ‘wp_title’, function( $title ) { // check if it the correct page if ( ! is_my_external_app_page() ) return $title; return get_title_from_external_app(); }); The implementation details are up to you.
I believe this forum post in the WordPress.org Support Forums will help. If you’d like me to research it more, I’ll update this post as I go… I hate telling someone to disable something without having a fix when it’s re-enabled.