-
Display post as featured if taxanomy matches current category
I have used ACF. I have added the 'taxonomy' select dropdown field to the post edit page. From the dropdown I select which category this post should be featured in, but my code is displaying the same post as featured across all categories.
Below is the code in the category.php file. I need it to display the most recent post which has been given a 'Feature In Category', and to therefore be featured in the category I h
Display Custom Post Type w/ Taxonomy/Category Shortcode
I am working on creating a shortcode function that will display a custom post type and is filterable by its category/taxonomy. I've figured out how to create the shortcode and have it display the post type. But I cannot get it to display the associated taxonomy categories.
I have created a custom post type called 'testimonials' I then created a taxonomy called 'testimonial-category'. Inside of this taxonomy I have a
WORDPRESS: Displaying posts from a category within a custom taxonomy, using custom post type
Hopefully one of you can help me out.
I have created a custom post type called FAQs, these need to be split up into categories. I created the a custom taxonomy and 3 categories within that. What I’m trying to do is display the posts of a specific category from the custom taxonomy.
The custom post type is avius_faqs The custom taxonomy is faqs_taxonomy The category I'm trying to display is survey-faqs
Get category id of custom post type in archive page
I have custom taxonomy and category like this :
products_categories cat-1 cat-1 post-1 post-2 post-3 cat-2 post-1 post-2 post-3 cat-3 post-1 post-2 post-3 cat-2 cat-1 post-1 post-2 post-3 cat-2 post-1 post-2 post-3 cat-3
show ACF field value from custom post type category
i am trying to show a field that i have added to custom post type category (taxonomy). the taxonomy called "category-products". i have added a field called "category_image" in which i want to add an image. But the acf field is not showing the value. here is what I have tried so far.
<?php $taxonomy = 'category-products'; $terms = get_terms($taxonomy); if ( $terms && !is_wp_error( $terms )
ACF - Display image from Custom Post Type custom Category
I have a problem and I believe the answer lies here: https://www.advancedcustomfields.com/resources/get-values-from-a-taxonomy-term/ But I cant figure out how to apply it to my code...
I have used Advanced Custom Fields to add an image field inside the categories of a custom post type. My custom pos
ACF Field Type Post Object to only show only top level parent pages from a Custom Post Type
I'm attempting to show only parent pages of a custom post type using Advanced Custom Fields Post Object field. Then I'm using Advanced Forms to show the form on the front-end. The problem is that I can't seem to figure out how show only parent pages from a custom post type.
Currently, it is outputting all posts, pages and custom post types pages on the front-end: !
Wordpress: Fetch custom field value in the right language (WPML)
I am pulling some data from an
API
and everything works fine except for when I try to "insert" into one of the repeater fields. Here is a sample of the data being pulled as presented byprint_r
functionArray ( [speakers] => Array ( [0] => Array ( [id] => 318880 [email] => test
Adding ACF to Woocommerce ul.products on Shop Page
I'm using WooCommerce and Advanced Custom Fields, where ACF group is set up with post type for products. I would like to add a couple of simple text fields to the products box below the product title, and it will display on all products.
I have looked and found the hook for this to be
woocommerce_after_shop_loop_item_title
Image attached for visual description.
How to use Hook Wordpress
I am using One User Avatar to upload profile pictures from frontend. Link to plugin with documentation: https://github.com/onedesigns/one-user-avatar
In the documentation it says - If you're building your own profile edit page with other fields, One User Avatar is automatically added to the show_user_profile and edit_user_profile hook
ACF Remove Image From WP Media Library (with php code)
I can’t figure out how to show “Checkbox” field type or any field type as a list on the frontend of Elementor?
Is there any custom shortcode to show as a list? I can find only this [acf field=”field_name”]
I am doing in ACF like this: https://imgur.com/a/y5ylecq
How to enable duplicate functionality on ACF Repeater
I'm using ACF for building custom Wordpress configuration options (inside custom options pages, settings, CPTs, Gutenberg blocks etc), for more than 5 years. I know there's an option in repeater fields to duplicate rows, but how can I enable it? All times I need to duplicate a row, I need to "inspect" the row element and, manually, disable the
display:none;
rule in the duplicate row button.So, I
Enqueue script based on ACF value
So I wanted to see if this is possible and how I might be able to solve this - But here is what I am using:
I have one ACF group created, that has two fields:
- Enable OneTrust, name: enable_onetrust, Radio Button
- Script Tag, name: onetrust_script_tag, Text Area
When I add in the
<script>
tag provided by OneTrust, it auto enqueues and renders on the front-end anShowing selected categories in a single of a custom post type (Wordpress)
I created a custom post type called members:
// Custom post types function members_post_type() { $args = array( 'labels' => array( 'name' => 'Members', 'singular_name' => 'Member',
Custom post type query by metabox value
I want Display in Services with a dropdown option list of category names on the top and when i select on any one category name, it would display His Custom posts in Services page on specific col-md-4 without refreshing. Is this possible in Wordpress?
&l
Change search query of a custom post type on the admin panel in wordpress
I want to change the query of search a custom post type in wordpress admin panel. I use this method:
function change_admin_search( $query ) { $post_type = 'custom_post_type'; if( ! is_admin() ) return; if ( $query->query['post_type'] != $post_type ) return; $search_term = $query->query_vars['s']; $persian = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹
Remove CPT slug but keep taxonomy slug rewrite
I have created a custom php form, And Also custom post type. now I need to make new metadata for custom posttype same as the contact form fields an make custom post type listing in backend.
How to Get The Taxonomy Term in Custom Post Type Loop Inside a Wp Query
I need to get the term of each post while running WP Query. I tried this inside the loop
$term = $loop->get_queried_object(); echo $term->name;
but I am still getting custom Post Type registered name instead of getting the Term!
$args = array( 'post_type' => 'services', 'post_status' => 'publish', 'posts_per_page' =&
WordPress show related posts based on taxonomy term
Below I have this code in single-courses.php which is currently displaying all the the courses. The goal is to show only related courses based on that courses' taxonomy term (category). Help please.
<?php $related = get_posts( array( 'taxonomy' => 'course_category', 'post_type' => 'courses', 'numberposts' => -1
How can i get related posts from all the custom post types based on custom taxonomy of particular post in WordPress?
Schema for posts has more arguments that are useful for filtering posts by category name or category id. I've registered multiple custom post types and they are missing those arguments?
How can I add/register more schema arguments with PHP for my custom post types in the WP Graphql? WP GraphQL docs don't cover this particular feature.
Any kind of advice/help will be great. Thanks in advance.
Please see
Jetsmart filter with CPT UI and ACF, replacing layout of another post type
I'm coding a recipe plugin with custom post types in WordPress. I created a custom post type called recipe with the below code:
register_post_type('recipes', array( 'labels' => array( 'name' => "Recipes", 'singular_name' => "Recipe", ), 'supports' => array(
Styling single.php dynamically by it's parent category in Wordpress
I'm developing a site using Wordpress which uses Categories for main sections with sub categories. Each main section is styled differently so I'm using the parent category slug for each sub category to add an id to the body tag. This works fine and allows all sub category pages to be styled the same as their parent category.
My issue is when you load a single post from a sub category page it uses the single.php tem
Get custom post type by category in a page template
I've created a custom post type with categories and sub categories, what I need to do is list out the post titles and images for a given sub-category or category in a page template.
I've got as far as getting the all the listed items in the custom post type, but I'm unsure how to go further... any help appreciated.
<?php $args = array( 'post_type' => 'portfolio', 'posts_per_page' => 10 );
Wordpress: use custom category template (category.php) for different custom post type
i need to customize my
category.php
template depending of which custom post type the cat is attached (assuming every post type has dedicated categories, not shared between pt, and dynamically created by site admin user).Alternative to this can be load different template (category-slug.php?) but codex says
category.php
is only and one.Any suggestion?
Solved by a link pro
Widget Logic WordPress Exclude a Parent Category and it's Children?
I am trying to only show a single parent category and it's children on a specific category page.
How do I exclude all other parent categories and their children?
I am using the plugin Widget Logic. I have gone through the usage and can't quite figure it out.
I have it setup to show just the widget for that category on that categories page, but it won't exclude the categories that aren't associated
Wordpress category
This is code from my wordpress homepage template. There are 3 same code, like this one bellow. The question is how can I put different categories to show different news when I post. At the moment code is same on my homepage and it show only category named World, it's the first category created. How can I setup the rest of code with different categories.
Excluding a Category Name (Not Posts) From A WordPress Template
I'm currently working with a template (Point from MyThemeShop) in WordPress that has been functioning fairly well for me. I've already made some customizations but am having one issue.
The theme pulls the most recent posts and displays them in a "Featured Posts" area at the top of the page. I wanted more control over the posts displayed here so I set up a category (Homepage Featured Posts) to better define which post
Wordpress Custom Post Type Category System
I currently have a custom post type
Projects
that I need to have a categorization system. Basically, I need to have the page heirarchy as such: Projects -> Project Listing -> Main Project Page.Does anyone know a preferred method of doing this? I currently have a page set up for all projects and that works fine. That pulls in all categories. The next step would be sorting project listings based on catego
Woocommerce: display parent category (is any) instead of current category
Creating a custom theme, I have to alter the way WooCommerce behaves when displaying a product category.
The default behavior is to display subcategories and/or products for user-selected category. For example subcategories and/or products for sub-sub-category_a when requesting
https://wordpress_site/product-category/category_a/sub-category_a/sub-sub-category_a/
What I want to achieve
WordPress | Post Query | Query on post categories to create sub-category filter and applying it to an Ajax filter in my function file
I'm struggling to get my portfolio page's filter to work. I have quite a good knowledge of WordPress and cannot seem to...
Aims:
Create a filter with only the categories that are a subcategory of a specified category.
Use the selected option from the sub-category filter to Ajax the relevant posts for the chosen filter into view.
So onto the relevant code:
CDN/sub-domain, resources, and versioning
I’m hoping to investigate/implement a CDN (initially just via a sub-domain, though moving over to CDN in time) and am having a mare finding resources that talk about handling of versions of files on that sub-domain.
Most places I’ve worked previously have implemented caching of resources (images, javascript, css, etc.) and when wanting to change an image, have gone through the painful process of just changing the fil
semi dynamic cdn
i'm developing couple of websites using php (directory script, etc.) and wordpress as cms. i need to improve its performance, by using cdn for static files (css, js, images). the problem is, css and javascript files are generated on the fly. i did that due to yahoo and some expert advice to combine the files into one file. also changing basic color of css files.
for the time being, i use couple of small vps but still
robots.txt which folders to disallow - SEO?
I am currently writing my robots.txt file and have some trouble deciding whether I should allow or disallow some folders for SEO purposes.
Here are the folders I have:
- /css/ (css)
- /js/ (javascript)
- /img/ (images i use for the website)
- /php/ (PHP which will return a blank page such as for example checkemail.php which checks an email address or register.php which puts data
How onepica image cdn for magento exactly work with ftp?
I am planning to use sub-domain for Magento media dir as a cdn.
Settings I did till so far :
magento store URL: example.com Media dir url: cdn.example.com/media/
So I installed onepica ImageCDN extension and setup it for FTP.
Image CDN settings: Current Adapter: FTPS File Result Cache: In database (recommended) Cache Time-to-Live: 1440 Verify File Size: Yes Image Compression:
Disallow crawling of the CDN site
So I have a site http://www.example.com.
The JS/CSS/Images are served from a CDN - http://xxxx.cloudfront.net OR http://cdn.example.com; they are both the same things. Now the CDN just serves any type of file, including my PHP
Redirect image requests from locations on origin domain to CDN domain
I'm setting up a WordPress site with the CloudFront CDN, also using the W3 Total cache plugin to configure much of it.
Someone suggested that, because of the possibility of old URLs remembered by Google, or for other reasons, I should use an .htaccess rule to redirect requests for images that live inside the level of the WordPress installation of the origin domain, to the CDN domain. I guess it's just to be on the s
robots.txt - Disallow folder but allow files within folder
I seem to have a conflict between my sitemap.xml and my robots.txt
All the images on my site are stored in the folder /pubstore When google crawls that folder it finds nothing because I an not including a listing of files in that folder.
This in turn generates hundreds of 404 errors in google search console.
What I decided to do, is block google from crawling the folder by adding:
Wordpress > change x-robots-tag
I have a Wordpress site that uses the Astra theme. In Chrome's Lighthouse tab it states:
Page is blocked from indexing Blocking Directive Source x-robots-tag: noindex, nofollow
However:
- In Wordpress (Settings > Reading) the box is unchecked for "Search engine visibility: Discourage search engines from indexing this site"
- The source code of the website
Matlab move multiple files in a directory
Using Matlab, I want to move the images present in the same directory in two new directories according to their name.
In the directory there are two set of image' name: 'neg-0.pgm', 'neg-1.pgm', 'neg-2.pgm', ... and 'pos-0.pgm', 'pos-1.pgm', 'pos-2.pgm', ...
I tried different functions to change the image directory but I wasn't able to make the operation successfully.
My code is:
if not(
pandas, json data format in .txt file, merge
I am trying to rename all sub-folders in a folder (e.g.
BOSE CORP + intext:randomtext here
-->BOSE CORP
). All of the sub-folders contain multiple files.for root, dirs, files in os.walk(path): for directory in dirs: new_name_dir = re.sub('(.*) \+ intext.*', r'\1', directory) os.rename(root + "/" + directory, root + "/" + new_name_dir)
Laravel 8 csrf (419 page expired) issue in subfolder deployment
I am trying to host a website on GitHub Pages which seems to only work if I place the HTML, CSS and JS files in the root folder. But the problem with this is that the positioning of elements on a page of my website is messed up.
Folder structure where files are together with faulty result:
Redirecting to subfolder
I have my website www.example.com and i have a page at www.example.com/site.
If i create a link at that website like this
<a href="/something.html">button</a>
then it redirects me toWant to disallow few url with the robots.txt
I want to block a few URLs in robots.txt, but I really don't know how to do this.
Below I have mentioned the URL, How should I disallow the dynamic URL. I really appreciate it if you help me to get rid of these doubts.
https://falgunishanepeacock.in/order-inquire?sku=FSPI-20NOVUN03LH
How to disallow multiple folder in robots.txt
I want to disallow robots from crawling any folder/subfolder.
I want to disallow the ff:
http://example.com/staging/ http://example.com/test/
And this is the code inside my robots.txt
User-agent: * Disallow: /staging/ Disallow: /test/
Is this right? and will it work?
What does this robot.txt mean?
So after a long fight trying to make the meta tags work with vue 3, now I am facing another issue. So I have a domain that contains several mini projects or websites, including this one, the problem I noticed is when I test my website locally in a tunnel(if u are interested to know what I use u can check ngrok) and then I test with metatags.io, I got all the info, everything okay there. But then on production doesn't work, I a
nginx robots.txt for two different domains and nginx.conf - but robots.txt in one folder
I use Shopware and have two different webshops with two domains, domainA and domainB. Now, they have only one robots.txt file in the public folder for both domains.
I need to go online with domainA, but can't do this because domainB should not be found in Google, etc. I have domainA.conf and domainB.conf, how can I use two different robots.txt files? Each for one domain?
Cloud Function robots.txt 404 page not found issue
I have deployed one simple app via go language in Cloud Function.
*A robots.txt file is also included when distributing the app.
In this regard, a simple app normally shows the image below.
Scrapy gets garbage when scraping .robots.txt
User-agent: * Disallow: / User-agent: Bingbot Disallow: /white-label/ User-agent: Googlebot Disallow: /white-label/ User-agent: Slurp Disallow: /white-label/ User-agent: DuckDuckBot Disallow: /white-label/
This is my
robots.txt
file. I want to block all crawlers for the entire website and allow only 4 bots on the entire website, with the exception of/white-label/<
How to write robots.txt code to stop indexing the few webpages
We have a orphan page on our website, this should be accessed only when someone receives a link to it on their email. We don't want this page to be indexed in search and don't want it to appear in any search. We have already excluded this page from out sitemap.xml. Should we have to mention this page url in robots.txt to disallow crawl?
My wordpress website occurred into a fatal error how can I solve it?
I have this error:
Warning: require(/home/gptradin/public_html/wp-content/themes/ecommerce-plusincludes/custom-header.php): failed to open stream: No such file or directory in /home/gptradin/public_html/wp-content/themes/techno/functions.php on line 78 Fatal error: require(): Failed opening required '/home/gptradin/public_html/wp-content/themes/ecommerce-plusincludes/custom-header.php' (include_path='.:/opt/