[youtube video=” “] < self closing shortcode View the code on Gist.
add this to a functions file:
To display the child pages of the current page, create a template part with the following content:
To display the sibling pages of the current page, create a template part with the following content:
This goes in a functions file. If you’d like to display the future post dates with links to the archives use this: To display the posts archive we’ll need to add the dates to the query.
Building a custom shortcode is pretty easy. Declare the vars and use ob_get_clean() to output the function. The shortcode should include the title, desc and url for the link. [add_pdf_shortcode title=“the title” desc=“the description” pdf=“http://link.com”]
This eample is adding a search box to the end of the nav with the id menu-2:
I recently created a post grid with 3 post loops of random posts, separated by a single meta field content after each iteration. This is where wp_list_pluck came into its own. You use the previous query array to offset the random posts used in the previous loop. to offset the previous posts include the post__not_in…
To add multiple fields you’ll first need to create a small funciton in your functions.php Then in your searchform.php you can add hidden fields like this. If you want to do this with any other filter, for example categories. Repeat the above and replace post_type with cat.
You can add two types to the editor, the first one below adds a button to the “Text” version of the editor. The second enables and adds the “Format” dropdown to the “Visual” version of the editor. For the text version we’ll need to create the shortcode that’s going to be applied by the button.…