Tag Info

Hot answers tagged

4

The HTML for the inserted internal links are generated by Javascript, so I'm not aware of any easy way to change it. The HTML generation is controlled from the wpLink.htmlUpdate method (HTML mode) and the wpLink.mceUpdate method (TinyMCE mode), in the /wp-includes/js/wplink.js file. Here are some ideas: Add a query parameter to the inserted links: We ...


2

There is nothing technically wrong with that, but backslashes are hard to type on some keyboard layouts. On a German keyboard for example, you have to hit the right AltGr key plus \ at the same time. This is not easy to type (and one of the reasons why I use an English keyboard). Use dots, colons or underscores to namespace your hooks. They are not bound ...


1

Please refer below : function disable_new_posts() { // Hide sidebar link global $submenu; unset($submenu['edit.php?post_type=CUSTOM_POST_TYPE'][10]); // Hide link on listing page if (isset($_GET['post_type']) && $_GET['post_type'] == 'CUSTOM_POST_TYPE') { echo '<style type="text/css"> #favorite-actions, .add-new-h2, .tablenav { ...


1

When you use wp_list_categories() you get a list of terms, each one linked to its archive page. I think what you need is a form to filter the products, not a list of archive term links, so you can keep the selected filters between requests, for example, using $_POST, $_SESSION or $_COOKIES. Example using $_POST: <?php //taxonomies you want to filter ...


1

WordPress Walkers aren't using constructors. They are started up with walk() method which is passed arguments as third argument (confusingly not reflected in method signature). You can capture it into your object's property with something like this: class Args_Walker extends Walker { public function walk( $elements, $max_depth ) { // we could ...



Only top voted, non community-wiki answers of a minimum length are eligible