Tag Info

Hot answers tagged

4

Your permalink structure is global; it is not a property of individual posts. There is no way to indicate that one post uses a certain permalink structure while another uses a different one. This makes sense when you think about how WordPress processes requests. Using the new structure, WordPress maps the request to index.php?name=$1 where $1 is the post ...


2

Everything after the ? is considered part of the query string. Everything before the ? is part of the pretty permalinks, aka rewrite rules. Rewrite rules are then processed to generate query variables. These are then plugged into a query ( which powers the main loop ), and a template is loaded based on this query. The parameters that come after the ? in ...


1

Solved!, Change $postID by $post->ID, so, rewriting function: function noticias_print_permalink( $permalink, $post, $leavename ){ $external_link = get_post_meta( $post->ID, 'external_link', true ); if( !empty( $external_link ) ) { $permalink = $external_link; } return $permalink; } Regards.


1

It makes no difference performance-wise, if it did, there'd be something seriously wrong with WordPress. The same goes for Google, if a lot of super smart people earning 100k salaries can't write software that handles a trailing slash, then something is terribly wrong with the world. Either way, WordPress puts the rel="canonical" tag in the header so ...


1

You can do this by checking the number of results returned by your query. Try this. <?php $rawfiltertag = get_post_meta( $post->ID, '_cmb_client_name', true ); $filtertag = sanitize_title( $rawfiltertag ); // wp_query arguments $args = array ( 'post_type' => 'post', 'meta_query' => array( array( ...


1

You're looking for: _wp_link_page( $page_number ); Must be used inside loop, and it return the opening tag: http://wpseek.com/function/_wp_link_page/


1

WordPress uses the redirect_guess_404_permalink() function as part of its canonical api to produce these results: Will also attempt to find the correct link when a user enters a URL that does not exist based on exact WordPress query. Will instead try to parse the URL or query in an attempt to figure the correct page to go to. You can disable ...


1

Use is_page(). The is_page() function accepts page title, slug or id. Documentation <?php if(is_page('myscript')) { include '/path/to/myscript.php'; } ?> UPDATE To add it to the content, you have two options 1. Find the content function in your template Find either the_content() or get_the_content() in your template. Place it immediately ...



Only top voted, non community-wiki answers of a minimum length are eligible