Community Forums › Forums › Archived Forums › Design Tips and Tricks › wp_title filter problem…. and some others
- This topic has 4 replies, 2 voices, and was last updated 7 years, 2 months ago by Victor Font.
-
AuthorPosts
-
February 17, 2017 at 12:38 pm #201400adjwittsMember
I'm fiddling around with a really old genesis theme it would seem....
And I have some errors!
I'm fairly new to this, so I am sure it is a simple fix...
REQUIRED: The <title> tags can only contain a call to wp_title(). Use the wp_title filter to modify the output
Whatever I seem to do, I can't make it budge! I haven't changed anything in the header.php, mainly because I can't without breaking the site somehow...
I have this in my functions.php which removes a couple of errors, but doesn't fix this one.
function wpse_add_title_support() {
add_theme_support( 'title-tag' );
}
add_action ( 'after_setup_theme', 'wpse_add_title_support' );I have tried lots and lots of solutions and fixes, but nothing seems to make this error budge?
Likewise, this one:
Warning: More than one text-domain is being used in this theme. This means the theme will not be compatible with WordPress.org language packs.
The domains found are genesis, magazine-proThe solution says to implement this:
// Set Localization (do not remove).
add_action( 'after_setup_theme', 'magazine_localization_setup' );
function magazine_localization_setup(){
load_child_theme_textdomain( 'magazine-pro', get_stylesheet_directory() . '/languages' );
}But when I check the functions.php, it's already in there?
I haven't tried to fix these ones yet - but if anyone has insight on those, that would be great - they are a little vague though on initial reading...
REQUIRED: Found a Customiser setting that did not have a sanitisation callback function. Every call to the add_setting() method needs to have a sanitisation callback function passed.
REQUIRED: admin.php. Themes should use add_theme_page() for adding admin pages.
Line 210: $this->pagehook = add_submenu_page( $this->page_id, $menu['page_title'], $menu['menu_title'],
Line 234: $this->pagehook = add_submenu_page( $menu['parent_slug'], $menu['page_title'], $menu['menu_ti
REQUIRED: admin.php. Themes should use add_theme_page() for adding admin pages.
Line 179: $this->pagehook = add_menu_page( $menu['page_title'], $menu['menu_title'], $menu['capability'I only have Yoast SEO installed, no other plugins basically... it's only in a testing environment, nothing live... so yeah, all any ideas welcome!
http://awitts.comFebruary 17, 2017 at 1:02 pm #201403Victor FontModeratorYou are not using an old theme. Magazine Pro is an HTML5 based theme.
You do have problems, I don't see the theme style sheet loaded on your site. Also, the code you are adding is completely unnecessary. You are trying to duplicate functionality already built into the Genesis framework. This is how Genesis renders the title tag:
echo '<title>'; wp_title( '' ); echo '</title>';
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?February 17, 2017 at 1:40 pm #201408adjwittsMemberOh yeah - that's because the "link" is for something else, but it insists on a link...
Working on localhost atm...
Not sure if I agree that the theme isn't old - there are lots of features in it which seem to be deprecated, or are due to be deprecated. I may be wrong - but that would also mean a lot of the tools I am using are wrong as well...
Anyway, some things are "required" in the "theme-check" plugin, and I am working through them, to try and learn the framework, eventually, I aim to make something pretty - but one step at a time...
Going back to the errors in theme-check, they are there! Here is the full -list, ignoring child theme of course...
unning 23617 tests against Magazine Pro using Guidelines Version: 20160523 Plugin revision: 1
One or more errors were found for Magazine Pro.
Warning: More than one text-domain is being used in this theme. This means the theme will not be compatible with WordPress.org language packs.
The domains found are genesis, magazine-pro
WARNING: Your theme appears to be in the wrong directory for the theme name. The directory name must match the slug of the theme. This theme's correct slug and text-domain is magazine-pro.
(If this is a child theme, you can ignore this error.)
WARNING: The theme uses the add_shortcode() function. Custom post-content shortcodes are plugin-territory functionality.
WARNING: file_get_contents was found in the file import-export.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
Line 336: $upload = file_get_contents( $_FILES['genesis-import-upload']['tmp_name'] );
WARNING: dwsync.xml Dreamweaver project file found.
REQUIRED: The <title> tags can only contain a call to wp_title(). Use the wp_title filter to modify the output
REQUIRED: Found a Customiser setting that did not have a sanitisation callback function. Every call to the add_setting() method needs to have a sanitisation callback function passed.
REQUIRED: admin.php. Themes should use add_theme_page() for adding admin pages.
Line 210: $this->pagehook = add_submenu_page( $this->page_id, $menu['page_title'], $menu['menu_title'],
Line 234: $this->pagehook = add_submenu_page( $menu['parent_slug'], $menu['page_title'], $menu['menu_ti
REQUIRED: admin.php. Themes should use add_theme_page() for adding admin pages.
Line 179: $this->pagehook = add_menu_page( $menu['page_title'], $menu['menu_title'], $menu['capability'Here are some more in the CSS style sheet - which shows redundant and dropped selectors:
Error in parsing value for '-webkit-text-size-adjust'. Declaration dropped. style.css:83:79
Unknown pseudo-class or pseudo-element '-webkit-inner-spin-button'. Ruleset ignored due to bad selector. style.css:83:1835
Unknown pseudo-class or pseudo-element '-webkit-search-cancel-button'. Ruleset ignored due to bad selector. style.css:83:1998
Unknown pseudo-class or pseudo-element '-webkit-input-placeholder'. Ruleset ignored due to bad selector. style.css:83:2096
Unknown pseudo-class or pseudo-element '-webkit-file-upload-button'. Ruleset ignored due to bad selector. style.css:83:2151
Unknown pseudo-class or pseudo-element 'selection'. Ruleset ignored due to bad selector. style.css:192:2
Unknown pseudo-class or pseudo-element '-webkit-input-placeholder'. Ruleset ignored due to bad selector. style.css:424:2
Unknown pseudo-class or pseudo-element '-webkit-search-cancel-button'. Ruleset ignored due to bad selector. style.css:495:22
Unknown pseudo-class or pseudo-element '-webkit-input-placeholder'. Ruleset ignored due to bad selector. style.css:908:33Here are a couple more, which I have been unable to fix, but have found while playing around:
Warning: Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections.
From line 93, column 414; to line 93, column 465
Right</h2><section id="search-2" class="widget widget_search"><div cThere are some more which are generated within dreamweaver too - things to do with button-roles, and some others....
This all may sound rather picky - but problem solving is a good way to learn how to do things - I found some more with media queries too - and functions due to be deprecated - but I can't find the tool I used for that to paste those issues in here...
February 17, 2017 at 1:48 pm #201409adjwittsMemberOh,
And this:
This is a child theme. The parent theme is: genesis. These files have been included automatically!
Child theme is only tested up to version 2.1 of Genesis breakage may occur! Genesis installed version is 2.4.2
February 17, 2017 at 2:21 pm #201410Victor FontModeratorYour theme check plugin is telling you things that are incorrect. Parent/child themes can have 2 text domains, one for the parent and one for the child. Genesis creates code that is modern, robust, and correct.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet? -
AuthorPosts
- The topic ‘wp_title filter problem…. and some others’ is closed to new replies.