Search Results

Search found 134 results on 6 pages for 'permalink'.

Page 1/6 | 1 2 3 4 5 6  | Next Page >

  • Regex to detect a proper permalink?

    - by Fedor
    These permalinks above are rerouted to my page: page.php?permalink=events/foo page.php?permalink=events/foo/ page.php?permalink=ru/events/foo page.php?permalink=ru/events/foo/ The events is dynamic, it could be specials or packages. My dilemma is basically; I need to detect an empty link in order so I can feed a robots no index meta tag in the case of: page.php?permalink=events page.php?permalink=events/ page.php?permalink=ru/events/ page.php?permalink=ru/events I can't use a simple pattern such as [a-zA-Z]+\/?(.+)/ since it won't work on the i18n permalinks. What regex could I use which would detect this, using $_GET['permalink'] as the reference to the permalinks? And avoid false positives? Update: Empty link means there's no fragment after the "events/" part. These are empty: page.php?permalink=events page.php?permalink=events/ page.php?permalink=ru/events/ page.php?permalink=ru/events

    Read the article

  • Rails, How can I combine multiple model attributes to create a unique permalink using permalink_fu?

    - by Ranknoodle
    Can Permalink_fu combine 2 or more model attributes to create a unique permalink? Let's say I have a Business Model, this model contains :name, :address, :phone, :city, :state, :country etc. attributes. Right now I have permalink set up in this model only for :name has_permalink :name So I would get "/biz/name". However I would like to combine the Business name, city, and a incremental number if there are more than 1 location in the city for that business. For example I would like to use: "/biz/joes-coffee-shack-chicago" for the permalink or if a multple location business "/biz/starbucks-chicago-92" Is this possible with the current permalink_fu plugin or some fork of permalink_fu? Or will this require some modification to the permalink_fu plugin?

    Read the article

  • Using - Instead of + in WordPress Search Permalink

    - by poer
    Options +FollowSymLinks RewriteEngine On RewriteCond %{THE_REQUEST} ^[A-Z]+ /(#[^?& ]*)??([^& ]*&)?s=([^& ]+)[^ ]* HTTP/ RewriteRule ^$ http://wordpressblog.com/search/%3? [R=301,L] Currently I use the above .htaccess mod_rewrite rule to convert default WordPress search permalink: http://wordpressblog.com/?s=key+word into nice permalink like this: http://wordpressblog.com/search/key+word My question is: What part of the mod_rewrite rule above that I need to change to get a nicer permalink like this one: http://wordpressblog.com/search/key-word.html Thanks.

    Read the article

  • Wordpress Custom Type permalink containing Taxonomy slug

    - by treznik
    I'm trying to create a permalink pattern for a Custom Type, that includes one of its taxonomies. The taxonomy name is known from the start (so I'm not trying to add or mix all of its taxonomies, just a specific one), but the value will by dynamic, of course. Normally, the Custom Type permalink is built using the rewrite arg with the slug param, but I don't see how I could add a dynamic variable in there. http://codex.wordpress.org/Function_Reference/register_post_type I'm guessing a custom solution is required, but I'm not sure what the best unintrusive approach would be. Is there a known practice for this or has anyone built something similar recently? I'm using WP 3.2.1 btw.

    Read the article

  • Create a permalink with Javascript

    - by Jon Romero
    I have a textbox where a user puts a string like this: "hello world! I think that __i__ am awesome (yes I am!)" I need to create a correct url like this: hello-world-i-think-that-i-am-awesome-yes-i-am How can be done using reg expressions? Also, is it possible to do it with Greek (for example)? "Ge?a s?? ??sµe" turns to geia-sou-kosme In other programming languages (python/ruby) I am using a translation array. Should I do the same here?

    Read the article

  • Rewriting URL to get Wordpress "permalink" type URL

    - by user1472575
    I would like my users to enter http://mywebsite.com/the-name-of-my-post and have the following execute: http://mywebsite.com/Default.aspx#&&the-name-of-my-post ...which is what the ScriptManager generates at runtime. I have created an ASP.NET site to replace a Wordpress site that creates "permalinks". This site was around for about 2 years so there are lots of bookmarks and references to these "permalinks" on the search engines etc. Also are there any modules I have to include in my website to get this to work? Is there any configuration that I have to ask my hosting company to make so that this works?

    Read the article

  • rails routes for permalink with namespaced class

    - by David
    this one in my routes works perfectly: map.connect ':permalink', :controller = 'pages', :action = 'show' for this class: class PagesController < BackendController and on /xxx/pages it is shown like this: <%= link_to "#{item.link_name}", {:controller = :pages, :action = :show, :permalink = item.permalink} % which will generate a link like "how-to-create-permalinks". but i decided to move the PagesController into a subdirectory so the class is now written like so: class Backend::PagesController < BackendController But how does the route look like now? And how do i display it on the template so it links using the permalink? Thanks!

    Read the article

  • Get page permalink and title outside the loop in wordpress

    - by Aakash Chakravarthy
    Hello, How to Get page permalink and title outside the loop in wordpress. I have a function like function get_post_info(){ $post; $permalink = get_permalink($post->ID); $title = get_the_title($post->ID); return $post_info('url' => $permalink, 'title' => $title); } when this function called within the loop, it returns the post's title and url. When it is called outside the loop. It is not returning the current page's title and url. When called in home page it should return the home page's title and url How to get like this ? instead this function returns the latest posts title and url

    Read the article

  • Permalink Ajax Issue Wordpress

    - by Soumya
    function AjaxRequest(section,divName) { var pageurl = fullPath+"/ajaxrequest.php?section="+section+"&divName="+divName; //alert(pageurl); var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById(divName).innerHTML=''; document.getElementById(divName).innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET",pageurl,true); xmlhttp.send(); } I have a Code like that in wordpress which is calling a page using ajax. It is working fine when the page are coming in ID like ?page_id=37 but stop working when I am activating Permalink like /overview/ajaxpage. I am getting 404 pafe error on xmlhttp.readyState. Can any one help me to solve it. I know its a permalink Problem probably this code of ajax is not sufficient for transmuting Permalink.

    Read the article

  • Wordpress FORCE UPDATE of permalink settings

    - by Scott B
    I've been having issues on creating new wordpress blogs where I'm setting permalinks via script on theme activation. However, even though they appear to be correct when I check the permalink settings in WP, my new pages are throwing 404 errors. The only fix I've found is that I have to go back to permalink options and click "Save Changes", even though, according to the display, I've made no changes to need to save... I'm setting permalinks to /%postname%/ Here's how I'm doing it. if(get_option('permalink_structure')==""){update_option('permalink_structure', '/%postname%/');} That script gets run when my theme is activated. Any ideas why it only partially does the job?

    Read the article

  • Getting Facebook Posts Permalink from Facebook Graph API Search

    - by Alexia
    I want to use the Facebook Graph API to search the public status updates concerning a keyword. For example, this works great: http://graph.facebook.com/search?q=obama&type=post It shows me all the posts with the word "obama" in it. If the post is a picture, it actually returns a field called "link" which is the permalink to the picture on the actual Facebook website, in the user's profile. Which is exactly what I want, but for pictures. But if the post in question is just a status update, i.e. just text, all it returns is the 3 fields: message, created_time, and updated_time. How do I view this actual status update on www.facebook.com? I realize I can view it on graph.facebook.com in JSON format, but I want to actually be able to show the permalink to the status update, or post. The final result I would like to retrieve might look something like this: http://www.facebook.com/[user id]/posts/[post id] With the [user id] and [post id] fields swapped out with the actual IDs, obviously. TIA!

    Read the article

  • Change post permalink structure on WordPress to use custom taxonomy

    - by TiuTalk
    Hi there! I want to change the post permalink schema on my WordPress 3.0-beta1 to use my new custom taxonomy. Today I can use /%category%/%postname%/ and the /my-category/my-post/ URL, that's nice but I need to use another taxonomy instead "category" one. I tried to use /%acervo%/%postname%/ but my URLs came with %acervo% on the URL instead the name of the "Acevo" (my taxonomy name) wich the post belongs to. I found something related to WP_Rewrite but without sucess...

    Read the article

  • Rails: redirect_to :controller=>'tips', :action => 'show', :id => @tip.permalink

    - by john
    hi, I tried to redirect rails to show action by passing controller, action, and params. However, rails ignores the name of action totally! what I got is http://mysite/controllername/paramId so i have error message.... here is the action code I used: def update @tip = current_user.tips.find(params[:id]) @tip.attributes = params[:tip] @tip.category_ids = params[:categories] @tip.tag_with(params[:tags]) if params[:tags] if @tip.save flash[:notice] = 'Tip was successfully updated.' redirect_to :controller=>'tips', :action => 'show', :id => @tip.permalink else render :action => 'edit' end end

    Read the article

  • .htacces - moving all posts in root to a new category

    - by Chris
    Could anyone please help me? I am at the last chance saloon and losing a lot of traffic. Any help would be greatfully received. After a year based on my permalink structure, all posts were in the root so have been picked up by Google as: snowmenu.com/postname Since changing my categories and permalink structure, I need the years worth of posts on Google to be redirected to: snowmenu.com/ski-snowboard-winter-sports-news/postname Is there a way to make this happen via .htaccess? Thank you very much to anyone who's able to help me.

    Read the article

  • how to category/subcategory/city/firm-name url?

    - by kkalgidim
    iam using ruby on rails i have models -category -subcategory -city -firm when i click on category it will show sub categories and permalink should be: xxx.com/category when i click subcategory it will show firms and city names. xxx.xom/category/subcategory when i clikc on city name it will filter firms belongs to that city xxx.com/category/subcategory/city when i clikc on firm name it will show xxx.com/category/subcategory/city/firm-name firms may have more than one sub category i used premalink_fu but i could not do that sub category system. category,subcategory,city,firm tables have their own permalink field on db. but i dont know how to combine them dynamically. i can do xxx.com/category but icant do xxx.com/category/subcategory how can i do that please help me

    Read the article

  • How to list all items in custom taxonomy with a permanlink in Wordpress

    - by Constant M
    Hi, Not sure how to word this. I've set up a type in Wordpress called Products. I also have two taxonomies linked to Products called Brands and Categories. When you create a product you can set to which Brand and Category the product belong to. It works perfectly when using the type as permalink to list everything within a type http://sitename.com/products but I can't seem to get the taxonomies working in the same way, ie. list all the items within a taxonomy (like an archive, I suppose): http://sitename.com/brands http://sitename.com/categories Is this possible, and if so, what could I possibly be doing wrong? I would try and set up some rewrite rules in functions.php, but I don't know what the query string looks like if you want to list items in a taxonomy, and if this is even possible. If it helps, I'm using the plugins More Types and Ultimate Taxonomy Manager to create the types and taxonomies.

    Read the article

  • Apache: Rewrite rule to remove slashes from the permalink?

    - by javipas
    I've seen this previous question on ServerFault, and I want something similar, but I'm not sure how to accomplish it. What I want is to remove all slashes from the permalink except for the one that goes after the domain name. For example: http://www.muycomputerpro.com/Actualidad/Especiales/La-Ciudad-Eficiente-Netapp would be redirected to http://www.muycomputerpro.com/ActualidadEspecialesLa-Ciudad-Eficiente-Netapp I need it to correct some 404 errors remaining on my WordPress blog under Apache web server. So, what would be the right rewrite rule?

    Read the article

  • Is it considered blackhat SEO to have hidden text within links?

    - by Sam152
    My aim is to simply be informative about where a link is pointing to search engines. I have some content that is listed by name and then I have a "Permalink" button. Would it be blackhat SEO to add some hidden text within the anchor that describes where the permalink is pointing? My content is like so: News Item 1 Permalink (<a href="/my-news-item-1"><hidden>News Item 1</hidden> Permalink</a>) Teaser text.. The news title of the block already links to the article, but I think it would be of benefit to users to provide and explicit permalink button.

    Read the article

  • How to set permalink of your blog post according to date and title of post?

    - by Amit
    I am having this website http://www.finalyearondesk.com . My blogs post link are set like this.. http://www.finalyearondesk.com/index.php?id=28 . I want it to set like this ... finalyearondesk.com/2011/09/22/how-to-recover-ubuntu-after-it-is-crashed/ . I am using the following function to get these posts... function get_content($id = '') { if($id != ""): $id = mysql_real_escape_string($id); $sql = "SELECT * from blog WHERE id = '$id'"; $return = '<p><a href="http://www.finalyearondesk.com/">Go back to Home page</a></p>'; echo $return; else: $sql = "select * from blog ORDER BY id DESC"; endif; $res = mysql_query($sql) or die(mysql_error()); if(mysql_num_rows($res) != 0): while($row = mysql_fetch_assoc($res)) { echo '<h1><a href="index.php?id=' . $row['id'] . '">' . $row['title'] . '</a></h1>'; echo '<p>' . "By: " . '<font color="orange">' . $row['author'] . '</font>' . ", Posted on: " . $row['date'] . '<p>'; echo '<p>' . $row['body'] . '</p><br />'; } else: echo '<p>We are really very sorry, this page does not exist!</p>'; endif; } Any suggestions how to do this? And can we do this by using .htaccess?

    Read the article

  • Wordpress, PHP, URL Encoding Issue

    - by Scott Porad
    Wordpress provides a function called "the_permalink()" that returns, you guessed it!, the permalink to a given post while in a loop of posts. I am trying to URL encode that permalink and when I execute this code: <?php print(the_permalink()); $permalink = the_permalink(); print($permalink); print(urlencode(the_permalink())); print(urlencode($permalink)); $url = 'http://wpmu.local/graphjam/2008/11/06/test4/'; print($url); print(urlencode($url)); ?> it produces these results in HTML: http://wpmu.local/graphjam/2008/11/06/test4/ http://wpmu.local/graphjam/2008/11/06/test4/ http://wpmu.local/graphjam/2008/11/06/test4/ http://wpmu.local/graphjam/2008/11/06/test4/ http%3A%2F%2Fwpmu.local%2Fgraphjam%2F2008%2F11%2F06%2Ftest4%2F I would expect lines 2, 3 and 5 of the output to be URL encoded, but only line 5 is so. Thoughts?

    Read the article

  • Dynamically changing Wordpress permalinks

    - by conrad
    i am trying to write a plugin which rewrites "post_link", "page_link", "category_link", "tag_link" with an action hook on wordpress. it's similar to this: add_action("post_link", "the_rewrite_function"); function the_rewrite_function($link) { ... return $new_link; } for example the permalink to the post is: http://www.example.com/2010/11/11/the-post-name/ i am changing it with the function to: http://www.example.com/2010/11/11/the-awesome-post-name/ of course when i do this the new permalink is going to 404 (as expected) what can i do to make the new permalink go to the original and working one? Please consider this: it should work on any permalink structure so a permalink structure spesific solution won't do any good. i need to solve this inside the plugin. thanks!

    Read the article

1 2 3 4 5 6  | Next Page >