I”d wrap it in a function (save it in functions.php
);
function wp_list_pages_with_hash( $hash, $args="" )
{
$add_hash = create_function( '$link', 'return $link . "#' . $hash . '";' );
add_filter( 'page_link', $add_hash );
$result = wp_list_pages( $args );
remove_filter( 'page_link', $add_hash );
return $result; // back compat in case 'echo' was null
}
Then call it like so!
<?php wp_list_pages_with_hash( 'target', 'title_li=&depth=0' ); ?>
Related Posts:
- How do I append lists in Prolog?
- Inorder Binary Tree Traversal (using Python)
- How to have a set of sets in Python?
- Learning Haskell: How to remove an item from a List in Haskell
- How to obtain a subarray in python 3
- Reversing a List in Prolog
- List Length in Prolog
- Removing default image size list in Media Box
- Changing a function in function.php to a shortcode – for listing categories of only a certain post type
- Listing all sub-pages?
- Editing a Post, 99% CPU?
- Similar posts formatting
- Introductory paragraph only in list of blog posts
- List all categories in options
- Check child/parent categories if exists
- WooCommerce Grid / List view
- custom walker wp menu last element
- How to divide and display categories into two columns
- To get list of bottom most or deepest or last child for specified parent category
- Display formatted list of taxonomy terms with last seperator different
- List of all entries of custom-post-type: Add year-parameter?
- Adding class to last list item? Not WP generated
- How do i wrap woocomerce attribute in list?
- List first letter of categories – issue upon spcecial characters (danish letters)
- How do I create an alphabetically organized glossary of links?
- Generate a nested list of all posts, sorted first by year, then by month
- Drop down list code for sidebar
- How correct list-style displayed in firefox? [closed]
- Output categories in something different than a list
- Wrap Meta Box with and for each new line
- get_all_category_ids for bookmark
- Add thumbnails in ‘li’ list
- List child pages alphabetically
- How to make a text string into a bullet list [closed]
- Replace values in list using Python
- Python initializing a list of lists
- How to override parent functions in child themes?
- How do I use the WP image functions in a page template?
- How to remove Customize from admin menu bar after WP 4.3
- why doesnt is_home() work in functions.php
- How do I make my function add variables/values to the $post object?
- Enabling shortcodes for custom fields
- Passing variables to templates (alternatives to globalizing variables)
- Load post with a different template?
- Generate Advanced Custom Fields box in custom admin menu page
- Change comments form title on a page by page basis
- Get the title before comma
- Most efficient way to get custom database records from 20 buttons and 20 tables?
- “Can’t use function return value in write context” error
- Display 4 chronological posts starting with a random post
- Save list from a custom meta box?
- jQuery Plugin to use WordPress functions in AJAX request
- right_now_content_table_end function not working?
- Empty Date Returned on my function
- Woocommerce Attributes pulling in wrong data
- Can’t check if a post has thumbnail adding filter to get_post_metadata()
- Echo tags used to describe the theme
- Custom Metabox Not Saving
- Edit Yoast SEO breadcrumbs output [closed]
- How to Display Frontend CSS for Administrator only
- How can I change a function in a parent theme via a child themes functions.php
- Automatically assign video ‘poster’ value to ‘filename’ for archive listing
- Homepage’s content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?
- Where to add the permalink in this function?
- Always the Latest google jQuery instead of default WordPress jQuery
- Override the WordPress core function wp_referer_field
- Download PDF after CF7 form submission
- Control the srcset much more (not all sizes in it each time)
- Warning: join(): Invalid arguments passed in post-template.php
- Export Form Data to a CSV then send it as an attachment – contact form 7
- Can’t locate custom image sizes defined by child theme
- Shortcode Attributes to Return different $_POST
- Cant display an image via PHP in wordpress
- how to change “posted by” words
- Template Loop – add switch case php
- Add attribute only to first image of every post via functions.php
- Add loggedout class on body using a function or JS
- Image rotation issue (horizontal picture uploading as vertical) — Exif issue?
- Conflict in function to allow single post template based on category
- How to require a config file in a template and in function.php?
- How to exclude meta no index pages from wp_list_pages
- Populate Product Regular Price with a calculated ACF Field Value
- Header menu aligned right on all pages except for single-post page [closed]
- require get_template_directory() . ‘path/to-my/file.php’ BREAKS customize > themes functionality
- Get Shortcode output to database for static post_content
- Auto remove tags on certain date
- get_field() with ID in one signal filter not working
- Create dynamic logo carousel without using any plugin
- Remove External Links from WordPress posts Using add_filter() in Theme functions.php
- Adding A New Widget to WordPress Disables the Existing Widgets
- Building WordPress Themes With Bootstrap with Adi Purdila → TutsPlus
- How to change number of posts shown on homepage vs other pages?
- Problem in outputting shortcode
- How to get tags and categories?
- WordPress causing all code to be displayed on line 1. Receiving multiple errors after cleaning cookies and cache
- How can I create a menu items from meta box based on users input
- loading custom.js file after jquery is loaded
- How do I access variables outside a function [closed]
- wordpress Search function is not working
- Make plugin admin page visible to other roles