How to Create Grey Background for Product Images on Website Display but Retain White Background on Downloaded JPGs?
Without the code of your Custom Post Type it’s kind of difficult to answer. I have few hypotheses : Have you flushed the permalinks ? You have to go to Settings > Permalinks > and click on Save to do so. Repeat this action anytime you modify the rewrite rules of your Custom Post Type. … Read more
post__in select all custom posts and not the selected array of ids
There is no magic plugin or SQL query that will do this for you. Why It’s Broken and Not in The Way You Thought There is only one taxonomy, because of this: ‘taxonomies’ => array( ‘category’ ), While your sites code may have registered multiple custom taxonomies perhaps even with different names, URLs, and semantics, … Read more
There’s a php function called strip_tags, see https://www.php.net/manual/en/function.strip-tags.php You can see it implemented for your use case here: Strip HTML Tags From Search Results Hope that helps.
I believe just one small edit to your code would get what you want. See if this works, just change the one if() statement to the following: if ( current_user_can( ‘edit_posts’ ) && $post_type !== ‘avia_framework_post’ )
It looks like this code is expecting slugs, which in the shortcode would look like this: [portfolio columns=”3″ title=”My Title” portfolio=”cat20,cat22,cat35″] (or whatever the actual category slugs are) instead of ids. If slugs in the shortcode are ok, it looks like this might work as written. If you wanted IDs, you’d need to add ‘ids’=> … Read more
Thanks to Tom, I understood how this works… I did not have any pages with the URL /shows-events/ so there is nowhere to redirect to When the user accesses the existing page /event/, it triggers a redirect to /shows-events/ (which does not exist), but because of WordPress’ canonical redirect, it returns to the existing URL … Read more
This is pretty straight forward and easy to do with $wpdb and SQL statement the relationship between any post type (custom or not) and taxonomy term (custom or not ) are stored wp_term_relationships table which has object_id and term_id all you have to do is query the record that has the term_id for active1 term … Read more
Custom URLs between different post types, using “Pods”