Permalink changes gives me 404 [closed]

Is your rewrite rule in your .htaccess well configured? Can you post it here? Should be configured like this: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress Source: Codex page on pretty permalinks

Strange Anchor Tag Behavior (in-page links work, external pages do not) [closed]

Just a tip: the structure of the headings with anchor tags is the following on that site: <h2><a id=”something” name=”something”></a>SOMETHING</h2><p>Description of that thing</p> However, the paragraph of the Corks section also contains the anchor tag of the following Wood section: <a name=”wood”></a>. Then the paragraph is closed and comes the <h2 id=”wood”>WOOD (clean, untreated)</h2> It … Read more

Permalink doesn’t get displayed in Twitter button (Local WordPress problem?)

After sleeping over the problem I decided to the code and tried this: <a href=”https://twitter.com/share?url=&text=<?php the_title(); ?>: <?php echo urlencode(get_permalink($post->ID)); ?> &via=username&count=horizontal” class=”custom-tweet-button”>Tweet</a> All I can say is: it works as it should be. Next thing on my agenda is to incorporate a custom url shortener. PS: It’s worth a mention that if you use … Read more

permalinks issue and archives

Now the question is why does WP only put the word “date” in when the permalink is “/%post_id%/%postname%/”? Because the WP_Rewrite class method get_date_permastruct only looks specifically for a clash between %date% and %post_id% tags. To get this date structure with other numeric-based post permalink structures, you can manipulate the date structure directly: function wpa57228_date_structure() … Read more

Rewrite rule for Custom post type Monthly and Yearly archive

I used this to enable yearly and monthly archive for custom post type. Just drop in this code into your functions.php file. This will add your custom rule right on the top of the Rules array. NB – WordPress uses rules array to store rewrite rules. <?php function wpse22992_custom_post_rewrite( $rewrite_rules ) { $cpslug = ‘contest_recipe’; … Read more