Customise wp_List_pages to output a UL LI

Arguments of wp_link_pages() Maybe this will work for you: $args = array( ‘before’ => ‘<ul><li>’ . __( ‘Pages:’ ), ‘after’ => ‘</li></ul>’, ‘link_before’ => ”, ‘link_after’ => ”, ‘next_or_number’ => ‘number’, ‘separator’ => ‘</li><li>’, ‘nextpagelink’ => __( ‘Next page’ ), ‘previouspagelink’ => __( ‘Previous page’ ), ‘pagelink’ => ‘%’, ‘echo’ => 1 ); wp_link_pages( $args … Read more

Easing the download of a regularly uploaded pdf

I would use ACF (Advanced Custom Fields) to give the option to add the file to the homepage. Then once a week when he needs to update it he can just go in and replace the existing file by uploading the new one. If the description or anything has to change then you can just … Read more

How do I hide the ‘Edit’ link in publshed posts

Edit links only shown to those who are logged in and has post editing capability. Seems you’re logged in as an admin. Readers cannot edit your post unless the reader is logged in and has post editing capability. Adding the edit link to the post is a theme specific feature. Usually, theme author implements this … Read more

Security concerns with external links

Since WordPress 5.1 (see #43187) it ships with the wp_targeted_link_rel() function, that adds noreferrer and noopener relation values to all anchor elements that have a target. This function is used to filter through the various input data just before saving it, e.g. post title, post content, post excerpt, comment content, term description, link description, link … Read more

Favorite websites with shortened hyperlinks

Sure, you’re looking for the shortcode API. That would enable you to write a short piece of code that does exactly what you want. As easy as this in your functions.php: function wpse246274_wiki( $atts ) { $link = “http://en.wikipedia.org/wiki/” . $atts[‘link’]; return $link; } add_shortcode( ‘wikilink’, ‘wpse246274_wiki’ ); Which you would use like this in … Read more

How to link to local post

Use the ugly link instead of the pretty link. For example, if your post id is 123, you can link to http://www.yoursite.com/?p=123. This will automatically get rewritten to your current pretty permalink. If you do it relative from the root, it also keeps the link intact if you change your domain name. (ex. href=”https://wordpress.stackexchange.com/?p=123″). To … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)