products category page editing
products category page editing
products category page editing
OK I solved this problem: New code: add_action(‘init’, ‘add_test_url’); function add_test_url() { global $wp_rewrite; add_rewrite_tag(‘%v%’, ‘(.+)’); add_rewrite_rule(‘^page-test/([^/]+)/?$’, ‘index.php?pagename=page-test&v=$matches[1]’, ‘top’); $wp_rewrite->flush_rules(); } /// for debug GET value: function console_log($content) { echo “<!– console_log: ” . get_query_var(‘v’) . “–>”; } add_filter(‘loop_start’, ‘console_log’, 9); Only thing left is .htaccess redirects from old url to new url: <IfModule mod_rewrite.c> … Read more
If you meant the title in the title tag as in <title>here</title> on single post pages, then you might want to use the single_post_title filter to prepend the string in question to the page title. E.g. add_filter( ‘single_post_title’, ‘recipe_single_post_title’, 10, 2 ); function recipe_single_post_title( $title, $post ) { if ( in_category( ‘recipes’, $post ) ) … Read more
Set parent page based on custom metabox value
How to show page title with capitalization only as I typed in?
Won’t it make more sense to limit number of pages that navigation displays? There are many instances when page is not wanted in navigation but still needed somewhere (I have privacy policy set up this way at my blog for example).
I tend to look for simple solutions so my suggestion is to query pages, sort by modified day and display in Dashboard widget. add_action( ‘wp_dashboard_setup’, ‘add_old_pages_widget’ ); function add_old_pages_widget() { wp_add_dashboard_widget( ‘oldpages’, ‘Oldest Pages’, ‘old_pages’ ); } function old_pages() { $pages = get_pages( array( ‘sort_column’ => ‘post_modified’ ) ); echo ‘<ul>’; foreach ( $pages as … Read more
I think your options are to actually use custom fields, but you can make them user friendly. The header is relatively simple, you can even have a preview or a selection of images to choose from, have a look at how the default twentyten theme enables header options, very user friendly, no urls are used … Read more
To display title of current page you use the_title() template tag. Related and slightly more specific functions are: get_the_title() that returns title without echoing and can retrieve title of another page/post, given its ID as input; the_title_attribute() that returns a little more cleaned up version (safer to use in link titles without breaking markup and … Read more
As usual – the_title() and the_content(). Posts page and a PAGE page are different in amount and type of content, but mechanics of main Loop and template tags are essentially same.