Subscribe: Comments on: Automatically generate your blog URL in WordPress posts
Added By: Feedage Forager Feedage Grade B rated
Language: English
code  content  directory  don  editor  generated  new  page  peter  plugin  posturl  reply peter  reply  shortcode  stylesheet directory 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Comments on: Automatically generate your blog URL in WordPress posts

Comments on: Automatically generate your blog URL in WordPress posts

Useful tips on Canada, cell phones, banking, technology, WordPress, PHP and more

Last Build Date: Sat, 03 Mar 2018 10:26:42 +0000


By: Kyle Lynn

Thu, 12 Mar 2015 18:27:48 +0000

Would it be possible to use this plugin to append text to the end of the current url. For example: I have this page: On the page I want to have a link that adds "-sample" to the end of the url to get to the page to buy the sample. This will make it so we have the same code on every product page but it dynamically generates the link so we don't have to change it for every product. Reply from Peter: You definitely could copy any of the PHP functions in the plugin and create your own that would append text at the end.

By: Bill

Wed, 05 Feb 2014 15:52:21 +0000

Will the use of these shortcodes cut down on server resource usage in comparison to the bloginfo() or get_bloginfo() functions? I am curious if they actually store the info into global variables instead of making php calls to mysql for each instance used in the code. If they it per users browser session or per webpage load? Reply from Peter: I don't know for sure, but I don't think short codes help with resource usage. However, the data behind it is probably cached within a page request in a global variable.

By: Stratos Nikolaidis

Mon, 07 Oct 2013 18:51:21 +0000

Peter, hi. Nice plugin, I would suggest you to "expand" it and include shortcodes in menu also! ;) Reply from Peter: Thanks -- that is a good suggestion. It might take a while for me to add it, but in the meantime I'd be happy to accept code submissions!

By: Micki

Sat, 07 Jan 2012 13:06:55 +0000

Hi, I’ve just found and started to use the plug-in. It’s mostly working nicely and really helps out when deploying a site to a live location. I however have one issue: When changing to short codes I cannot get the pictures to appear in the visual editor. Everything works fine when you view the page but in the visual editor I just get a broken link icon instead of the picture. Does anyone have any insight into this? (I’m using WordPress 3.2.1) Reply from Peter: I don't know of an easy solution to that, but perhaps someone else can share their findings!

By: Dee

Mon, 21 Nov 2011 17:30:16 +0000

Hi Peter, actually your shortocde plugin works PERFECTLY for what I need it for. I tested it with my existing content generator plugin using the code I mentioned above along with your shortcode inside the URL. And it generated the exact "same post URL" once newly generated... {KEYWORD} turned the new post with my chosen keyword to Test Post Code ...and on my actual blog the keyword now has an internal permalink structure linking to its own post. Thanks for this great shortcode!

By: Dee

Mon, 21 Nov 2011 16:59:04 +0000

Hi Peter, Is it possible to use your shortcode plugin to auto generate the NEW post URL vs having to put in an ID# for some other random post? For example, I use CPMage by Greg Jacobs. It's a plugin that generates articles from various directories, etc... and i use their keyword tag to generate the post and the content {KEYWORD}. Is it possible to use your code to ensure that when a NEW post is generated it will know to pull the URL of that NEW POST? Here's the use of your code, and wondering if it would work for my needs? See below: {KEYWORD} Reply from Peter: I'm not sure if I completely understand the use case, but I'm guessing that my plugin is not what you are looking for. The "posturl" shortcode as implemented is only for the article in which it is placed. You'd have to write your own custom logic to have it based on anything other than the current post.

By: Eric

Wed, 27 Jul 2011 21:31:55 +0000

Helpful plugin, Peter. Thanks! I should point out that although WP's default uploads directory is wp-content/uploads, the plugin doesn't know that; at least it didn't work that way for me... I had to manually enter wp-content/uploads in Media Settings in order for the 'uploads' shortcode to work. Other than that, it's great. Reply from Peter: Thanks for pointing that out. The plugin has a setting for that to be hard-coded near the bottom of the file, but I should probably have a smarter automatic fallback in a subsequent plugin release.

By: A

Sun, 06 Mar 2011 08:07:54 +0000

I have a question about the templateurl shortcode: Do you use the template_url or stylesheet_directory? Because those are two different things and if I'm using a child theme, it'll call the *parent* theme instead. Might be better if you had a stylesheet_directory shortcode as well. Also, hope you can check if this is compatible with WP 3.1. Thank you. :) Reply from Peter: Thanks for the feedback. It is compatible with WordPress 3.1. It uses get_bloginfo( 'template_url' ) (which you can change near the top of the plugin file). However, you are right that I should add [childtemplateurl] (and have that output stylesheet_directory) as well. I've now released that with version 0.3.

By: Agnes

Thu, 14 Oct 2010 06:12:23 +0000

This is great Peter, Am using in every web. I would love a [template url] shortcode added though Thks Agnes Reply from Peter: I just released version 0.2 with the shortcode [templateurl]

By: Agnes

Fri, 08 Oct 2010 15:20:29 +0000

Thanks Peter, the plugin is very useful and I found nothing else to fill that function. I am using it mostly to insert images into the pages. One frustration though (unless it is me doing sthg wrong?): It has to be done in HTML mode - I can do, but the clients when they want to update will have trouble. Is there any way to use through the WYSYWYG editor? (am using tinymce advanced editor) Thks Agnes PS: more preciserl, for example when I insert an image or other item from media library, I need to change in HTML to avcoid the absolute path reference and use shortcodes. Any way to avoid that? Reply from Peter: You can use [blogurl] in the TinyMCE view. Also, in the image properties box, you can also use [blogurl] in the "Link URL" field, as well as in the "Source" field in the "Advanced Settings" tab. I haven't looked into how to affect the default-generated URLs nor to create a completely new button and new dialog / properties box behavior.