Hot answers tagged

4

I found a solution based on the code of this page: https://core.trac.wordpress.org/ticket/22180 All attachment files have a post status of 'inherit'. So first you need to add "inherit" as one of the possible post status to search for. You can use the wp_link_query_args filter to do that. function my_wp_link_query_args( $query ) { if (is_admin()){ ...


3

The sidebar description runs through esc_html(), so you cannot pass HTML directly. But you can use the filter esc_html to insert your desired content. Here is a simple example: add_action( 'widgets_init', function() { $desc = "Read the <a href='http://wordpress.stackexchange.com/q/189749/73'>explanation</a>!"; $placeholder = ...


3

We could hook into the after_wp_tiny_mce with some CSS to hide it, if the wplink editor plugin is loaded. Example: add_action( 'after_wp_tiny_mce', function( $settings ) { // Check for the 'wplink' editor plugin if( isset( $settings['content']['plugins'] ) && false !== strpos( $settings['content']['plugins'], 'wplink' ) ) ...


3

There is not ethical way of doing this. But still there is a way to do this. WordPress wrote wpLink script keeping in mind that editor is there but still WordPress handle when editor is not there (Good Thing) Consider this example and assume that we are using it on front-end in footer. First enqueue the essential style and scripts. function ...


2

Place this code in your functions.php file add_action( 'admin_print_scripts-post.php', 'wpse22643_overwrite_wplinks' ); add_action( 'admin_print_scripts-post-new.php', 'wpse22643_overwrite_wplinks' ); function wpse22643_overwrite_wplinks( $hook ) { // register is important, that other plugins will change or deactivate this wp_register_script( ...


2

I have found the answers after spending some hours on it. Well i found that there was .htaccess file inside wpuploads folder with code. order deny,allow deny from all I deleted it and hence all is working now.


2

This question is really too localized to get a solid answer and will most likely get closed. Here's a quick guide to narrow down what the issue is - but the fact that I can click the links just fine and you can't makes it sound like an issue with your system and not necessarily WordPress: Site Broken? / \ Nope ...


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 ...


2

Assuming you are reading this answer in the future (December 2015 or later). Starting from WordPress 4.4.0, The $class argument was added. So: edit_post_link( __('Edit'), '', '', 0, 'post-edit-link btn btn-default' ); See edit_post_link documentation.


1

What you are doing isn't ever going to work the way you want. the_terms() is going to produce a list of complete a tags so you can't nest or merge it with another one like you are trying to do. And there are no convenient arguments or filters that would allow you to alter that link text. There are some not-so-convenient ones though. The simplest is a filter ...


1

Using JS is not really the best possible solution as it can be disabled on client side. You can also use PHP like regular expressions and DOM to alter the links, but I really think the most reliable way to achive this is to rebuild the list throught the term_link-post_tag filter which is located inside the get_the_term_list() function which is used by ...


1

Within each menu item, object_id holds the ID of whatever object the menu item refers to. This will be a post / page / CPT / term ID. If it's a custom link, the ID refers to itself. (If you want to know what type of object it is, object contains that.) get_queried_object_id() will give you the ID of the current page. We can use the API function ...


1

This is mostly a PHP question and it is related to WooCommerce. Either of which conditions makes it dangerously close to off-topic. However, I am going to give the benefit of the doubt and assume that the problem is due to a misunderstanding of the WordPress function wp_get_post_terms(). ;) wp_get_post_terms() returns all of the terms as an array of term ...


1

WordPress has the function edit_post_link() to Displays a link to edit the current post, if a user is logged in and allowed to edit the post.


1

It would be more efficient to add a container with a certain class name around content that has been created with the HTML tab. That way you're avoiding the code getting bulky.


1

you can use: add_filter('the_content', 'addClassToLinks'); function addClassToLinks($content){ return str_replace( '<a ', "<a class='myclass'", $content); } But i don't recommend it. Just add in theme an specific class for container of the content. It is cleaner and use in css: .myclass a { // css for a that is fount inside myclass }


1

You can use Advanced Tinymce plugin to solve your problem. This plugin enables the advanced features of TinyMCE, the WordPress WYSIWYG editor. It includes 15 plugins for TinyMCE that are automatically enabled or disabled depending on what buttons are chosen. You can see demo here.


1

When adding an external link you need to include HTTP:// or HTTPS:// at the start of the URL to link to an external domain. Otherwise the link will be added onto the current domain.


1

After having the same issue, I've come up with a basic solution - hopefully it's not too late for you. The Visual Composer "accordion plugin" seems to be a wrapper around the jQuery UI accordion; so the same methods are available. I've written some basic (room for improvement no doubt) code that checks if there is a hash on the end of the URL, and then ...


1

You could use this search and replace tool: search and replace by interconnectit Apart from that you could put some redirects in your htaccess, but really the search and replace works great.


1

First of all, you are using $rinter as a number and at the same time as an URL for the anchor element. Secondly, the href attribute requires mentioning the protocol (http(s):// for example) in front of the domain or else it will just be relative to the current viewing address. ($rinter should be something like http://www.w3.org instead of just www.w3.org)


1

It's due to AAM (Advanced Access Manager) plugin. You have different options to fix the issue. 1) Disable AAM Media Manager plugin 2) You can changes AAM Media Manager plugin version 3) If you do not want AAM to handle your website images, Go to the following file /advanced-access-manager/extension/AAM_Media_Manager/extension.php and find private $_skip = ...


1

You need to create the hierarchy using page parents. Either use quick edit, or go through each page and set it's parent, so that you end up with: Menu1Submenu1 (Menu1 is parent)Item1 (Submenu1 is parent)


1

Settings --> Permalinks. Choose 'post name'. See the official Wordpress codex page for more.



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