New answers tagged

-5

All those answers above are unnecessarily complicated. I am a newbie and I found this out by experimentation. $admin_title holds the title in admin-header.php, so simply remove — Wordpress from line 43-47 to remove "— WordPress" from the title. Play around in those lines to manipulate the title.


0

You are using the Advanced custom fields plugin. The documentation for images: http://www.advancedcustomfields.com/resources/image/ To display the alt-tag for example, you can use this snippet: $image = get_field('image'); if( !empty( $image ) ) { $alt = $image['alt']; ... echo '<img src="..." alt=" . $alt .">' }


-2

At function.php file in your theme comment code //add_theme_support( 'title-tag' );


2

Turns out you are not the only one: https://core.trac.wordpress.org/ticket/32095 It looks like this was removed in a recent update (4.2) and I can see why they did it. User interface can be confusing at times. You can read more about the removal here: http://wptavern.com/how-to-restore-the-link-title-attribute-removed-in-wordpress-4-2 There is a ...


0

You can find in inc/template-tags.php file. if ( is_category() ) { $title = sprintf( __( 'Category: %s', 'tesseract' ), single_cat_title( '', false ) ); }


1

The post object is passed by reference as the second parameter of the save_post action (do_action ( 'save_post', int $post_ID, WP_Post $post, bool $update ). You can use this post object to get the post date and author from. You can try the following: (NOTE: The code is untested) add_action( 'save_post', 'wpse_214927_alter_title', 10, 2 ); function ...


0

Use the function get_post_meta($post_id) to get the post meta data. Hope this helps.


2

Here is your updated function solving your 2 problems : // Post title as keywords, excluded stop words function title_as_keywords( $word ) { $blacklist = array('this', 'about', 'that', 'them'); // Excluded words ... $whitelist = array('one', 'man', 'boy'/*etc..*/); // Whitelisted words ... if ( (!in_array( $word, $blacklist ) && strlen( ...


0

Do you mean the archive title? There is a few ways to do that, but probably the easiest is go the archive-product.php template and edit this line: <h1 class="page-title"><?php woocommerce_page_title(); ?></h1> Add in something like this: <?php if (!is_product_category() && apply_filters( 'woocommerce_show_page_title', true ) ...


1

I don't see a filter in wp-login for the title, but it does use __() so you might be able to use the gettext filter like: add_filter('gettext', 'wpse_214367_change_login_title', 20, 3); function wpse_214367_change_login_title( $translated_text, $untranslated_text, $domain ) { if( "Log In" == $untranslated_text ) $translated_text = "My ...



Top 50 recent answers are included