change title separator
Yes, everything is simple, there is a standard wordpress options and settings of the SEO plugin, I’m involved in the standard settings, a vertical divider as to remove it entirely from the functions of the theme?
Yes, everything is simple, there is a standard wordpress options and settings of the SEO plugin, I’m involved in the standard settings, a vertical divider as to remove it entirely from the functions of the theme?
Don’t see add_filter result in the site front page
PHP has a function for url encoding that would probably work: urlencode( get_the_title() );
In WordPress attachments are stored as posts so you can use most of the post specific WordPress calls and functions to read/write data associated with the attachment. This applies to post meta data for an attachment as well. So in this case, since you have the post ID ( same as $attachment_id ) you can … Read more
Yes you can pass the variable in category_name. But I think it should be get_the_title() instead of the_title(). $title = get_the_title(); $args = array( ‘category_name’ => $title ); Try this. But remember category_name only accepts category slug, not category name. You can also use following method if your page title/slug are different. And I think … Read more
The filter wp_title changes only the function wp_title() when it’s called. So, you must double check on your theme’s source code if before your header is using wp_title. Anyway, you can set your filter on functions.php. A function to identify your param GET should be something like so: function maybe_change_wp_title_ver( $title, $sep ) { if … Read more
I found that i just have to use $post->post_name instead of $post->post_title because $post->post_name holds the slug also the autogenerated if you save as draft without defining a title. So the code would as follows global $post; $slug = $post->post_name; echo “<script>alert (‘”.$title.”)</script>”; $args = array( ‘post_type’ => ‘traener’, ‘posts_per_page’ => -1, ‘orderby’ => ‘post_title’, … Read more
You can try this function wpb_hidetitle_class($classes) { if ( is_single() || is_page() ) : $classes[] = ‘hidetitle’; return $classes; endif; return $classes; } add_filter(‘post_class’, ‘wpb_hidetitle_class’); CSS code : .hidetitle .entry-title { display : none; } Source http://www.wpbeginner.com/plugins/how-to-hide-post-and-page-titles-in-wordpress-single-pages/
You have a few issues here remove_filter( current_filter(), __FUNCTION__ ) is used in wrong context here for what you need to do. remove_filter() unsets the filter from the GLOBALS array once the filter has run once, so your filter is removed after the first run. This happens with spaghetti functions. You should always return the … Read more
Depending on how you are outputting the title, the answer is different. But there are two possibilities. By Using wp_title(); If your theme is using the wp_title(); function in its header.php file, you can use the wp_title filter. However, this function is being deprecated since 4.4. add_filter( ‘wp_title’, ‘filter_the_title’ ); function filter_the_title( $title ) { … Read more