ogicu812
Forum Replies Created
-
Forum: Requests and Feedback
In reply to: SSL URL when using get_bloginfo(‘url’) …Did you ever find a solution for this? I am wanting to do this for all my urls….
***Nevermind, I changed the blog and wordpress urls in the General settings to “https://….”
Forum: Fixing WordPress
In reply to: Function for generating a page url?Even better… (handles permalinks)
function get_page_url_by_pagename($pagename) { $p = get_posts("pagename=$pagename"); $p = $p[0]; $url = get_permalink($p); return $url; }Forum: Fixing WordPress
In reply to: Function for generating a page url?Got it…
The query_posts() method modifies “The Loop”. You can use the get_posts() method instead:
function get_page_url_by_pagename($pagename) { $p = get_posts("pagename=$pagename"); $p = $p[0]; return $p->guid; }Forum: Fixing WordPress
In reply to: Function for generating a page url?Thanks for the reply. I’ve created some custom pages using custom templates. On some of them I have included links that need to go to other pages and also a form submission where the form action is the url of another page. I would like some way of generating the url as shown in my original post. I tried the following but it starting messing up how posts were displayed in WordPress 2.8:
function get_page_url_by_pagename($pagename) { $p = query_posts("pagename=$pagename"); $p = $p[0]; return $p->guid; }Because I need this functionality outside “The Loop”, the_permalink() functions, etc. won’t work for me.
Any thoughts?
Forum: Fixing WordPress
In reply to: How do I get a list of categories sorted by their post counts?cool, thanks!
it looks like it only generates an html unordered list. is there a way to get an html ordered list?