Articles of customization

Hide Customizer's Widget Choices From The List

Is there a way to hide a few selected widgets (E.g.: Calendar & Recent Comment) from the Customizer’s list using my child’s theme functions.php or style.css. Refer to the screenshot below:

Display Custom Post Types Glossary

I have a custom Post Type called as “Book” and I want to display a “Glossary” on my home page like – ‘A B C D E F…’ so that they can be linked to a page on my website as – or for “C” & “B” letters respectively. I have seen this […]

Adding tags when creating new post

I am trying to create a new post with tags. Not having any luck and am not able to find any explanations online of what I may be doing wrong. methods: { createPost: function() { let title = this.newPostTitle; let content = this.newPostContent; let postCategories = this.postCategories; let tags = this.newPostTags.split(“,”); let data = { […]

How to get the current category with custom posts

If I go to: domain.example/category/skydancers-en-blikvangers/ I want to get all the posts in the current category for skydancers-en-blikvangers, I know I can hard code the category but this needs to be a dynamic template. So if I go to category/other-category that needs to work as well. Category.php: <div class=”container”> <div class=”row”> <div class=”col-md-12″> <div class=”jumbotron”> […]

Custom Post type content within a slider

I’m trying to create a slider that displays slides with info from custom post type posts (Testimonials). I have a page template set up that generates divs with the post content, but what’s the best way to tackle the slider element? P.S. I’d like the slides to display in a random order too, if possible. […]

Separate header for static home page and posts page

My custom headers are located in the folder /parts/header/ and header selection is controlled using theme panel, so I tried write like this in my header.php but came out blank header in static front page, please advice. if (is_front_page() ) { get_header( ‘/parts/header/header-style-11.php’ ); } else { /* * loads the header template set in […]

Position a hard-coded menu item

I used a piece of code I found here in wordpress.stackexchange to add a custom link to my menu/nav. I adapted to my needs and it works great. The problem is it adds the link in the first position in my navigation list but I want it at the end after the other links. Does […]

CSS added through customizer neglects the need of a child theme?

Many developers know that if you change the style.css of a theme, and then the theme gets updated, your changes will be deleted. The traditional solution for that is creating a child theme inheriting everything from the parent theme, while changing the child theme’s CSS. But what about a case when I change the CSS […]

Hide a certain category name from Related Posts

I am trying to alter a plugin that has this code to display Related Categories names under the post: <?php if ( count( get_the_category() ) ) : ?> <span class=”cat-links”> <?php printf( __( ‘<span class=”%1$s”>See related Videos</span> %2$s’, ‘posts-in-page’ ), ‘entry-utility-prep entry-utility-prep-cat-links’, get_the_category_list( ‘, ‘ ) ); ?> </span> <?php endif; ?> Can someone please […]

searchform.php doesn't work properly

I made a searchform.php file to custom my search widget as I read, but when I use the search widget, it doesn’t make the searches well, it sarches in the page of the categorie i’m writing. Is there anything wrong with my code? <form role=”search” method=”get” id=”searchform” class=”searchform” action=”<?php esc_url( home_url( ‘/’ ) ); ?>”> […]