Pretty Permalinks with CTP and Taxonomies / Hierarchical

Found a git repo that had the solution: https://github.com/hemal21/WordPress-CPT-Hierarchical-Taxonomy-Permalinks/blob/master/cpt-hierarchical-tax-permalinks.php I needed do a rewrite, Here is an example of working pretty permalink code: <?php /** * WordPress Custom Post Type and Hierarchical Taxonomy Permalinks * * Ever wanted to have custom taxonomy permalinks that reflect parent/child relation? * Then this is for you. Still in … Read more

Link to a custom page without a permalink?

First of all thank you to @jdm2112 for such a quick response. I was able to serve a custom page by creating a page from inside the WordPress admin panel to get a permalink wordpress.live/blogs. After that I setup my page.php to loop through all the posts using the following code <?php get_header();?> <?php $wpdb … Read more

permalinks constantly needs re-saving

When you visit the Permalinks page, the permalinks rules are being flushed. It also forces WordPress to reload them. For this reason, you see the issue go away after saving permalink settings. But after some time, it comes back once again . Try following these steps: Deactivate all the plugins. Then activate one by one. … Read more

add different custom fields value to post class if permalink or index

ok have a working fix, I used an if else statement combined with is_home to change <article id=”post-<?php the_ID(); ?>” <?php post_class(get_field(‘custom_field_X’)); ?> to <?php if ( is_home()) post_class(get_field(‘custom_field_X’)); else post_class(get_field(‘custom_field_Y’)); ?>> which has removed the custom_field_x settings from the permalink pages fo the posts. maybe there is a more elegant solution out there but … Read more