problem with category menu, it doesn’t want to show link
I couldn’t find any other way to resolve this problem. i tried a lot of thing to add link to the category menu but without any success.
I couldn’t find any other way to resolve this problem. i tried a lot of thing to add link to the category menu but without any success.
Do you want to preserve the images title attribute? If not here is a code that fixes that for you: add_filter(‘the_content’, ‘remove_title_attr’); function remove_title_attr($text) { // Get all title=”…” tags from the html. $result = array(); preg_match_all(‘|title=”[^”]*”|U’, $text, $result); // Replace all occurances with an empty string. foreach($result[0] as $html_tag) { $text = str_replace($html_tag, ”, … Read more
I figured out how to retitle the attachment myself, using a combination of the answers from these two posts: How can I add a default description to uploaded files? Change attachment filename Here’s the code, it’s working on my current WP installation (v4.3) function wpse_retitle_attachment( $post_ID ) { $file = get_attached_file($post_ID); $path = pathinfo($file); $args … Read more
If you place the code below in single.php file anywhere you want the links to appear in your posts, or inside a function in functions.php and the function tied to a filter or an action like ‘the_content’, the you shold get a list of links to the posts that have the same tag or tags … Read more
If you are using wordpress, this guide might help you – https://developer.wordpress.org/reference/functions/add_image_size/
function new_excerpt_more( $more ) { return ‘ <a href=”‘. get_permalink( get_the_ID() ) . ‘#placeholder”> ‘ . __(‘<br/><br/> Read More’) . ‘</a>’; } add_filter( ‘excerpt_more’, ‘new_excerpt_more’); I think that should do it.
Michelle is right. You could create your own walker and override the default method that creates the anchor. Or you can hack it by doing this: jQuery(document).ready(function($) { var current = $(“#nav_menu_id”).find(“.current-menu-item”); $(current).html( $(current).find(“a”).html() ); }); Where “nav_menu_id” is the id of your menu you wish to accomplish this on. Personally, I would invest the … Read more
Check out the nav_menu_link_attributes filter. Using this you should be able to grab the href and modify it as you require.
As a temporary (but poor fix) the below code can be added to “functions.php”. //Remove nofollow function rm_nofollow($txt){ $txt=str_replace(‘ rel=”nofollow”‘,”,$txt); return $txt; } add_filter(‘bbp_get_topic_content’,’rm_nofollow’,20); add_filter(‘bbp_get_reply_content’,’rm_nofollow’,20);
I’m assuming you’re referring to: get_template_directory() get_template_directory_uri() get_template_directory() is an absolute path – so if you’re including a PHP file that is in your template directory this would be a good function to use. If you’re using a child theme and need to reference something in the parent theme you could also use this function. … Read more