Categories
CMS Mastering Development Wordpress

Pagination custom post type not working with rewrite slug

I can’t find the way of making my pagination to work on my post type (this is not on an archive-posttype.php). I’ve rewrited my post type, but the second page isn’t working if I do the rewriting ("medias/actualites"), but it works if I have the non-rewrited slug ("actualite"). I do the rewrite because my client […]

Categories
CMS Mastering Development Wordpress

Custom post type author issues

I’ve created a CPT called ‘artigos’ (articles), which supports title, editor, thumbnail and author. I can see and choose the author of the post, but in the users screen, the number of posts assigned to an author doesn’t change, and the author page can’t find the articles. Am I missing something? function custom_post_type_artigos() { $labels […]

Categories
CMS Mastering Development Wordpress

Custom post type permalin return bad url

I have problem with custom post type. In BO url’s are ok example: page.pl/post_type_name/post_title When I try use get_the_permalink(); or the_permalink it return url like: /?post_type=cpt_wydarzenia&p=258" Code: $args = array( "label" => __( "Wydarzenia", "vilo" ), ‘labels’ => $labels, ‘hierarchical’ => false, ‘supports’ => array(‘title’, ‘editor’), //’taxonomies’ => array( ‘category’, ‘post_tag’ ), ‘public’ => true, […]

Categories
Mastering Development

Query set for a pie-chart

I think I am just making a simple error here, but I can’t seem to solve it. I am trying to create some fake data and analyze through different types of users which I will then put into a pie chart. Here is my models.py: from django.db import models import factory import factory.django import factory.fuzzy […]

Categories
CMS Mastering Development Wordpress

Category permalinks don’t work even after flushing

I have created a custom post type (portfolio) and I’m using the built-in Category taxonomy with it. When I view the category archives page, only regular posts are showing under the category, my custom posts aren’t there at all. The options to select categories are there in the Edit Post page (and Quick Edit), they […]

Categories
Mastering Development

Cannot read property ‘parentNode’ of null when using apex-charts in Angular

I’m using Angular apex charts"ng-apexcharts": "^1.2.3" and the chart shows initial data correctly. I’m having this error Cannot read property ‘parentNode’ of null when I change the id in params. What I understood is that the chart is being called before the dom is ready. What I need is to change data based on params […]

Categories
CMS Mastering Development Wordpress

How to get rewrited name of cusom taxonomy?

I have registered custom post taxonomy with rewrited name: register_taxonomy(‘behold_gallery-albums-subject’, ‘behold_gallery’,array( ‘hierarchical’ => true, ‘labels’ => $labels, ‘show_ui’ => true, ‘show_admin_column’ => true, ‘rewrite’ => array( ‘slug’ => ‘kategorie-galerii’, ‘with_front’ => true ), ‘update_count_callback’ => ‘_update_post_term_count’, ‘query_var’ => true, )); so name of my custom taxonomy is ‘behold_gallery-albums-subject’ but is rewrited to ‘kategorie-galerii’. If I […]

Categories
CMS Mastering Development Wordpress

Values from meta-box not on $_POST

I have a meta-box for a cpt and can’t get the values from the form to update_post_meta cpt declaration: function hgod_fichas() { $labels = array( … ); $args = array( ‘label’ => __(‘Fichas’, ‘hgodinho’), ‘description’ => __(‘Fichamento’, ‘hgodinho’), ‘labels’ => $labels, ‘supports’ => array(‘title’, ‘editor’, ‘thumbnail’, ‘revisions’), ‘hierarchical’ => false, ‘public’ => true, ‘show_ui’ => […]

Categories
CMS Mastering Development Wordpress

Use same slug base for Custom Post Type posts, and multiple taxonomy terms

I have done a lot of digging the past few days, and can come close, but not exactly what I need. I’m trying to alter a custom taxonomy/CPT permalink structure to all use the same slug base: /resources/. CPT: ‘resources’ TAX1, non-hierarchical: ‘type’ TAX2, hierarchical: ‘section’ I need the structure to look like this: /resources/ […]

Categories
CMS Mastering Development Wordpress

‘No Results Found’ on single post for custom post type

I’m using the CPT UI plugin to create a custom post type with a custom taxonomy. I’m finding however that the individual post page shows “No Results Found”. I’m using this page slug as the CPT custom rewrite slug: wbc-activity-page The terms page is working correctly on this url: domain.com/wbc-activity-page/home/ The issue is that the […]