Articles of customization

Display value of custom field at the beginning of a post

I’ve been using the subtitles plugin to display a teaser text to my posts right underneath the title (which is named _subtitle, and stored in the post’s meta). How do I display this value at the post_content‘s beginning?

How to request container_class from wp_nav_menu

I’m currently trying to setup a custom nav walker that will use container_class from the menu as a prefix for the class names of the list items and children. $defaults = array( ‘menu’ => ”, ‘menu_class’ => ”, ‘menu_id’ => ”, ‘container’ => ‘nav’, ‘container_class’ => ‘nav-primary’, ‘container_id’ => ”, ‘before’ => ”, ‘after’ => […]

How to custom post navigation

I’m not an expert in PHP but would like to customize the pagination of my posts. Instead of having : prev 1, 2, 3, 4, next I would like : Prev 1 of 4 Next It seems I have to modify my single.php file and these lines : <?php wp_link_pages(array(‘before’ => ‘<div class=”pagination”>’, ‘after’ => […]

Custom Tags Archive – permalinks not working

I need to create Custom tags archive like normal tags in post_type “post”. ex: i need this work like add_action( ‘init’, ‘create_mtags_taxonomy’ ); function create_mtags_taxonomy() { $labels = array( ‘name’ => ‘More Tags’, ‘singular_name’ => ‘More Tags’, ‘menu_name’ => ‘More Tags’, ); register_taxonomy( ‘mtags’, ‘post’, array( ‘label’ => __( ‘More Tags’ ), ‘hierarchical’ […]

How to export custom post type with ACF to individual file with automation?

I have a custom post type product using ACF (Advanced Custom Fields) I would like to schedule a daily cron task automation to export all published posts into post_id.txt, one for each post. I know there are plugins that can export custom post type and ACF to CSV or XML. But my requirement is a […]

Showing different pages depending on a cookie value

I have a website that asks the visitors to choose a language on the first page, I store the option in a cookie and I am showing the content (starting with second page) depending on this option. I want to show the second page without showing the first one as long as the cookie is […]

How to append custom text to the output of 'categories widget'?

How do I customize the “categories widget” to append additional text on the sidebar display? from category 1 category 2 category 3 category 4 to category 1 folder category 2 folder category 3 folder category 4 folder Without actually modifying the category name in the database, I would like to add some actual customized text […]

Display posts by combining multiple meta key

Basically a post is an event therefor will be displayed once or twice, depending on meta key. Every post has at least two meta keys $start_time_1 and $end_time_1. Let’s say i have two posts, title: “Radio Show” and “TV Show”. Radio Show – start @ 2016-07-01 12:00 TV Show – start @ 2016-07-01 15:00 My […]

Keyword search in multiple categories

I’ve spent a day or so on this now and I’m turning to the community for assistance. Firstly, I am trying to achieve something like this post: WordPress Multiple Category Search In my theme template, I have a custom search form: <form id=”searchform” method=”get” action=”<?php bloginfo(‘url’); ?>”> <fieldset> <input type=”text” name=”s” value=”” placeholder=”Search…”></input> <button type=”submit”>Search</button> […]

How to create custom layouts and static pages in themes for clients

How do I build goodlooking, custom pages into my themes. I’ve decided to use underscores to create custom client themes, as I need complete freedom in design, and all the tutorials I’ve found on theme development seem to just show how to build blog style websites, but I’d like to build sites with multi column […]