permalinks

Is there a CakePHP component/plugin that does permanent links for ajax pages?

好久不见. 提交于 2019-12-11 23:15:05
问题 I'm using the JsHelper to write JS links to use ajax to load in a page. Like this: <?= $this->Js->link($item['Series']['title'], array( 'controller' => 'series', 'action' => 'view', $item['Series']['id'] ), array('update' => '#menu-items')); ?> This is working fine, but now I'd like to add it so that you can link to these pages. So, for example, when you click the link it would redirect you to example.com/#!/series/2 . You could then also go to this url and the correct page would be loaded in

WordPress custom post type: Query by id works, by post_name doesn't

爱⌒轻易说出口 提交于 2019-12-11 16:31:37
问题 I would need some help with Wordpress and custom post types/permalinks. I registered custom post type by the name "services" with the following arguments: $args = array( 'labels' => $labels, 'singular_label' => __('services'), 'public' => true, 'query_var' => true, 'show_ui' => true, 'menu_icon' => get_stylesheet_directory_uri() . '/img/wp-menu-ico.png', 'menu_position' => null, 'capability_type' => 'page', 'hierarchical' => false, 'rewrite' => array('slug' => 'services', 'with_front' => TRUE

How To Redirect with modified URL using .htacess

萝らか妹 提交于 2019-12-11 14:47:36
问题 I want to move my website to a new domain. But, facing a problem with Permalink structure. Example, Old Structure: oldsite.com/salman-khan-biography/ New Structure: newsite.com/salman-khan-movies/ Actually, just single word will be changed from the end of permalinks. I tried below codes, but it's showing 404 not found on the new domain. RewriteEngine on RewriteCond %{HTTP_HOST} ^oldsite.com [NC,OR] RewriteCond %{HTTP_HOST} ^www.oldsite.com [NC] RewriteRule ^(.*)$ http://newsite.com/$1 [L,R

Wordpress permalink behavior

不想你离开。 提交于 2019-12-11 14:29:42
问题 I am running an AWS medium LAMP instance. I have three beta testing Wordpress sites all are running and rendering pages, none are 100% complete. Server software versions are: php 7.0.3 httpd apache/2.4.33 Wordpress 4.9.8 I have spend considerable time researching my particular challenge, including writing some plugin code to attempt understanding the problem, I'm getting close but have not cracked the problem just yet. The issue I am experiencing, is when I change my permalink settings to

wordpress permalinks

我们两清 提交于 2019-12-11 13:50:13
问题 I set my wordpress permalink structure to /%postname%/ but now when I go to a page other than the home page (for example if I went to somelink.com/about) I lose all javascript references. I think this happens because the links to the js files are no longer right as it is in the imaginary folder "about". This is how the js files are referenced in the header.php file. <script type="text/javascript" src="wp-content/themes/default/js/jquery-1.4.2.min.js"></script> <script type="text/javascript"

What are the steps to getting this 'custom' permalink scheme in Jekyll?

ぐ巨炮叔叔 提交于 2019-12-11 10:53:40
问题 I'm writing a Jekyll setup and I'd like to get my posts to have a permalink in the form: /2013/jan/something-something-in-january . I understand that it is impossible with vanilla permalinks to: get the :month to be in text form or get the :title to be dash delimited I remember reading somewhere that I could achieve this by writing a plugin, but I'm not sure how. How can I do this? 回答1: I created a generator plugin: module Jekyll class PermalinkRewriter < Generator safe true priority :low def

Is it possible to create an orchard autoroute using contents of a custom type property?

谁都会走 提交于 2019-12-11 03:51:36
问题 I have an Orchard cms module with some additional Content types set up and have added an AutoRoute component via code. Everything works perfectly, however I am not happy with the default permalink pattern. What I am trying to do is add a custom pattern and use one of the public properties in my content type. In my case the custom type has a public property called ClubName and I would like that to be used (It makes more sense from a routing perspective). The Orchard part class name is called

Wordpress “Post name” permalinks not working

寵の児 提交于 2019-12-11 03:36:56
问题 I have a Wordpress website running on Lamp Server on Ubuntu Server 14.04. I just tried to use the option for Post Name permalinks, and now my pages no longer load up. I turned on the mod_rewrite function of the Apache server, restarted it, but it still doesn't work. Also, here's my .htaccess file: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index

Purely numerical wordpress permalinks

孤街浪徒 提交于 2019-12-11 00:40:58
问题 Can I have single digit wordpress permalinks? Trying to force the permalink to "2" e.g. automatically rewrites it to "2-2". Looking into it a bit further I discovered this is the case for any numerical permalink - I reckon it has to do with possible interference with paging but have a use case where I would like to use this structure.. 回答1: I've dealt with this once by intercepting the post slug creation and "fixing" it somehow. Maybe you can work from this: /* * New permalink structure * *

Wordpress Category Link get_category_link(id)

放肆的年华 提交于 2019-12-10 21:50:17
问题 I need to link to a category in my wordpress site. The following code works, somewhat: <?php // Get the ID of a given category $category_id = get_cat_ID( 'People' ); // Get the URL of this category $category_link = get_category_link( $category_id ); ?> My problem is that it includes /category/ in the url, which isn't how my permalink structure is designed. Does anyone know a way around including /category/ in the url it outputs? 回答1: I don't understand what you want to do. Look here Template