rodsazo
Forum Replies Created
-
Forum: Plugins
In reply to: [ACF qTranslate] WYSIWYG Broken with latest qTranslate-x and ACF ProSame here.
Had to delete line 53 in src/acf_5/fields/wysiwyg.php
It is calling a non existing function.
Forum: Fixing WordPress
In reply to: WordPress 4.4 update breaks wp_nav_menu() layoutWhen using this justified layout “trick”, you need the “li” elements separated by at least one space.
Previous versions of the nav walker (the class WP uses to construct the menu) appended a new line after every “li” element like so:
public function end_el( &$output, $item, $depth = 0, $args = array() ) { $output .= "</li>\n"; }
The newest version does not:
public function end_el( &$output, $item, $depth = 0, $args = array() ) { $output .= '</li>'; }
The result is “li” elements adjacent to one another like
"<li> ... </li><li> ... </li>"
with no space in between, which does not work for the justified grid layout.
SOLUTION
This isn’t very elegant, but you can solve the problem with this filter:
// Justified layout fix add_filter('wp_nav_menu_items', 'filter_menu_items'); function filter_menu_items($menu_items){ return str_replace('</li><li', "</li> <li", $menu_items); }
Or something like that. ??
Forum: Fixing WordPress
In reply to: Issue with Custom Post Types, Custom Meta Boxes, and Media UploaderHow did you hide the main content box?
Forum: Fixing WordPress
In reply to: Issue with Custom Post Types, Custom Meta Boxes, and Media UploaderHow did you hide the main content box?
Forum: Fixing WordPress
In reply to: single.php working for custom post types, but not for normal postsI don’t consider this solved, because the problem persists, but I fixed it by quitting the use of custom permalink structure
Mine was %category%/%postname%/
but when I choose some of the default structures, single.php displays properly.
Searching on the Codex there is a note:
For performance reasons, it is not a good idea to start your permalink structure with the category, tag, author, or postname fields. The reason is that these are text fields, and using them at the beginning of your permalink structure it takes more time for WordPress to distinguish your Post URLs from Page URLs (which always use the text “page slug” as the URL), and to compensate, WordPress stores a lot of extra information in its database (so much that sites with lots of Pages have experienced difficulties). So, it is best to have at least two path segments in your post’s permalink structure such as /%year%/%postname%/ or even /posts/%postname%/. (Some people recommend /%post_id%/%postname%/ which works for performance reasons but others recommend against it because it is unfriendly to users in the many contexts in which users interact with URLs.) See Otto’s technical writeup on the topic as well as this wp-testers discussion.
I hope it helps more people