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


2

you can follow the below Steps : Step 1 : In the wp-admin, go to Appearance -> Menus,put the class on the menu item here "CSS Classes (optional)". If you can't see the "CSS Classes (optional)" in the menu item, then there is "Screen Option" in the right top of the screen and there are the options "CSS Class" under "Show advanced menu properties". Step 2: ...


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

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


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

<?php // Display Custom Field Value echo "<ul>"; echo "<li>License Type: ".get_post_meta( $post->ID, 'License Type', true )."</li>"; echo '<li><a href="' . get_post_meta( $post->ID, 'Download Comp', true ) . '">Download Comp</a></li>'; echo "</ul>"; ?>


1

I believe you are using wordpress on your website...To add read more text u just need to use the wordpress visual editor. In this the 12 no. button is used to add read more text...Use this to add read more, there may be possibility that while adding code you are making some error..


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

What would you do if the user uses a proxy and randomizes his IP address? There are numerous browser plugins to simplify that to a click of a button to download multiple times. The same goes for cookies. Aside from that you are trying to collect data that allows to identify users, which is illegal in lots of countries. What (could) work much better is a ...


1

URL-encode spaces beforehand: make_clickable( str_replace( ' ', '%20', $text ) );


1

As asked on the .org support forums XFN is a HTML profile which describes the meaning of extra semantic data that can be added to the rel attribute of outbound links. If you specify relationship information in the link manager for the links you add then this describes the meaning of those attributes to a consumer of your site. You can ...


1

This is something you cannot change in the field it self, but in the template file. Copy and paste here the template file where this option is outputted. Another way will be to add a javascript snippet to you head, if you have such option in you template. Comment here and we'll see what the best solution is. Update: I think best solution for you is to ...


1

If I understand your question correctly, I think what you are looking for is edit_post_link(); To use it just insert <?php edit_post_link(); ?> into your theme. This will output a edit link leading to the current page/posts editor. Update after rewrite of question: You can replace your link with the following to include the posts slug in the url. ...


1

You can use $_GET to get the query string values and then pass it in the $args to create a dynamic WP_Query $after = $_GET['after']; $before = $_GET['before']; and then in the $args if ($after && $before) { $args = array( 'date_query' => array( array( 'after' => $after, 'before' ...


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)



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