Tag Info

New answers tagged

1

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


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


0

The easiest way, if this should only be added to some of the links; Insert the link, then switch to the HTML tab in the editor. Find your link in the source code, add class="your-class" and you're done.


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


0

Is it possible? Sure. You just need to re-declare the wpLink function that generates the link from the button. For example like this function wpse_181706_overwrite_wpLink() { if (wp_script_is('quicktags')){ ?> <script type="text/javascript"> var wpLink;!function(e){var t,i,n,s,l={},a={},r="ontouchend"in ...


0

If you mean all links, you can style the links using the "a" tag in CSS. In the last example below I have specified a visited link. p a:link { color: #000000; } p a:visited { color: #000000; }


0

I found a solution. Since the wp_get_attachment_link does not seem to work I solved this within an already used other filter:img_caption_shortcode Within this filter function the content variable contains the image link tag. Here a just added the title using a simple search and replace: $content = str_replace("<a","<a title='".$attr['caption'] . ...


0

You're probably getting that error because WordPress doesn't have the $wp_rewrite global loaded yet for some reason. Either something deactivated it, or you're trying to run those functions before WordPress has a chance to load it. If you're trying to do this in a plugin or in your theme's functions.php file, make sure you're inside a function that is ...


0

(I can't comment for being 50- reputation) I didn't understand your problem well. Choose or tell us; 1) Your post content have links and you want to add nofollow to links in custom fields which already used in content 2) You're writing your custom field's value already but just want to add nofollow. or tell us your scenario Update <a href="<?php ...


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

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


0

Edit You have indicated that you wish to reuse this code, so it is better used within a function so that it can be called whenever you desire. I've made changes to my answer to reflect this below. You can use the below code to generate a list of posts (in you case 2x random posts) together with a header. The output is formated in a way indicated by the ...


0

Found the problem: on a mamp environment with ssl activated, on installation wordpress setted the database url options with https in front. Just changed theme to http on the remote server. On the local mamp enviroment I had also to restart the server without ssl.



Top 50 recent answers are included