Just tested this and it worked on my end. The shortcode itself would be [titlelink]
function titlelink_ssc($content = null) {
ob_start();
echo '<a href="'.get_permalink().'" title="'.get_the_title().'">'.get_the_title().'</a>';
$titlelink_ssc = ob_get_clean();
return $titlelink_ssc;
}
add_shortcode("titlelink", "titlelink_ssc");
Related Posts:
- Remove line breaks in wp_list_categories()?
- different tag different stylesheet
- How to check if I am inside the WP Theme Customizer preview?
- Is there a way to display a menu using the ol tag instead of the default ul tag?
- Getting tagid from tagname
- Sort list of page templates a-z?
- How do I str_replace with template tag?
- How to modify template tags function?
- edit_post_link returns blank
- Get list of body classes for X page?
- Misleading information in the Codex, how do they get away with it? [closed]
- Manually set global $post vars with an ID, in order to use template tags
- why doesn’t the_content() work in this {single-custom_post_type.php} page?
- On the category page, get the category object
- How to get the clean permalink in a draft?
- How do I display a tag cloud under my post that only shows tags from that post?
- Making a Shortcode [NEXT] and [PREVIOUS] to place into specific posts for post navigation
- get_parent_theme_file_path vs. get_template_directory
- Multisite get_home_url(); – Getting URL for current site
- How to show the real post date in a draft
- setup_postdata is not returning any values
- Minor css-change based on topmenu – how?
- how to limit and display tag?
- WordPress function/template tag to get first n words of the content
- Template tags vs get_template_part() vs functions.php
- Get permalink and title by post name?
- Strange Behaviour with is_home()
- How can I link a CSS file only on single posts?
- Check if password protected post is visible
- How do I reset this wp_list_categories query?
- ‘is’ functions and ‘get_query_var’ not working
- Disable Woocommerce product tags display by alphabetical order
- Adding country tags automatically
- Editing Category Pages
- Displaying page content in category archive (archive.php)
- tag.php pagination and query_posts()
- Exclude a category from the_category in the single post page
- Changing Image Size In The Content tag
- Multiple templates for single custom post type
- Checking if a specific date archive is being displayed
- Edit css for search results page
- How to support letting users add their OWN logo to a custom theme?
- What is the p parameter in a get_posts() parameter array?
- How do I get the trackback count of a post in wordpress without writing an SQL query?
- help
- Is it possible to add a child post into the parent page?
- Return function only on certain pages
- WP Method `get_theme_file_uri()` Doesn’t Seem To Be Working Properly When Used In The Head Section Of A Site
- php within html within php
- navigation link based on custom field
- Displaying list of subcategories and not parent category
- is_front_page and is_home are not working in page.php
- How to query details of images in gallery that is attached to a post
- How to show ‘tags’ in ‘WordPress Pages’ [not Posts]
- How to display a custom taxonomy without a link?
- Code to check how many posts a tag has?
- Show the section only if custom taxonomy was chosen
- Template Tag Does Not Work in Page Template
- Getting custom post type author and date published
- Custom Fields Question
- the_category() tag not styling HTML or CSS
- Function to echo (or display?) wordpress tags in the head section
- Setting selected term_id with wp_dropdown_categories?
- Organize template parts and page templates in folders in regards of template hierarchy
- Conditional template tag for buddypress pages
- is_front_page use in sidebar.php
- Show the current post’s category, without displaying parent category
- Why does this search.php not work?
- Second Level Menu
- How can I detemine the parameters needed by the_widget()?
- How to use wordpress plugin functions on my “home” page?
- how to add # before tags?
- Is there a template tag I can use to link to the archive page corresponding to the month that a post was published on?
- How to tell if all posts are only in one category?
- How to Rearrange WordPress Tags list on frontend using Shortcode with specific order?
- How do I get tags linking to proper pages (/tag/sample-tag -> pages with that tag)
- How to add Text before my Custom Term and hide it when empty
- Child theme overirde template-tags in a theme built on underscores in inc/template-tags
- small problem in the article ()
- Get_header raises an 500 internal server error
- Tag pages with regular editor
- Pagination doesn’t work in query post in tag template
- using themename_the_custom_logo() in template-tags?
- Limit Tag Links in Post Content
- Show author image at home page latestest posts plugin
- method to fetch entire tag list on archive.php
- Template tags not working in the customizer preview
- WordPress tag or archive php file customization
- Hide Certain Tags on Single Post Page
- Calling the first & last post by category in custom post type
- Own Custom Tags/Category page ( posts)
- Tags results not displaying for post types
- WP Query conflict on tag.php and category.php template
- Tags Sorted By Characters?
- Targeting all pages except top level pages
- Listing parent section in search results
- comments_number fails to print
- Why don’t some template tags work when querying information on single.php?
- Adding more information to a Content Product Category
- What file is responsible with tags displaying on the post?