All Questions

1
vote
1answer
1k views

Some custom taxonomy child terms not showing in admin. Caching problem?

I have a problem with some custom taxonomy terms. I am using "Types" plugin for creating custom post types and custom taxonomies. I successfully created my postype and hierarchical taxonomy and ...
-1
votes
3answers
148 views

wp_query get data from advanced custom field in wordpress

I want to get the data from advanced custom field using wp_query from another custom post type: $title = get_the_title(); $the_query = new WP_Query( array( 'posts_per_page'=>9, '...
0
votes
0answers
18 views
+50

How to link Wordpress heartbeat to ajax form

I have a form that $_POSTs an input value, and user's ID that saves the data to the database: // frontend form <form id="form"> <input type="radio" name="location" id="name1" value="1"&...
0
votes
1answer
26 views

update_option returns false in AJAX, how to debug?

I tried debug plugins for WordPress, but they only show the current page SQL queries. How to debug if update_option returns false? I am updating an object decoded from AJAX request with json_decode ...
0
votes
1answer
1k views

Alt text not showing up

Morning all, I have read lots of messages on this subject but am no closer to getting alternative text for images working on my web pages. WP 4.9.2 running the Store99 theme. If I look in one of my ...
1
vote
0answers
6 views

Create thumbnail size only for a few images?

I have a few posts that require their thumbnail sizes to be 1000x430. If I register this size and regenerate the thumbnails, it will create this size for all images in the media folder, if I'm not ...
0
votes
1answer
6 views

How to fix 404 on post after prepending Custom Post Type url with Custom Taxonomy Term slug

I'm setting up "special" url structure for posts etc Result i want to get is: sitename.com/club/justcavali club is term from taxonomy (club_type) and justcavali is post type (booking_type) after i ...
0
votes
2answers
238 views

Can't get dynamic Gutenberg block to render on the frontend

I tried everything I found online. The backend appears, including dynamic segments (withSelect, etc). But the simplest 'render-callback' doesn't appear on the frontend. plugin.php /** * Plugin ...
0
votes
1answer
7 views

Best practices/popular methods for distributing a program with a plugin?

Are there any best practice guidelines regarding how a plugin should distribute a third-party program with it's own installation? If there are no guidelines, then what are the most popular methods? ...
0
votes
1answer
16 views

Can I edit domain settings if I didn't create the site?

A friend has created a WordPress site and added me as an administrator. I need to be able to add a sub-domain that points to a different website but all the instructions I can find require me to ...
1
vote
1answer
15 views

Sort by two dates. Default entry date and custom field if present

I have a custom post type where there is an option to sort by date. There is however a custom date field that allows changing the display date. This custom date field is not always filled. Right now ...
0
votes
1answer
926 views

wp_email not sending the mails in multisite sub domain

I have a multisite enabled wordpress configurtaion say my main domain is http://www.example.com. It have several subdomains such as http://test1.example.com, http://test2.example.com and so on. I ...
0
votes
1answer
9 views

New user notification issue

I'm having an issue with our business' website. Every new user that registers on our site will never get an email confirmation which has the randomly generated password. As for us, the admins, we do ...
2
votes
2answers
1k views

Minimal WordPress load for only `get_option` to work (because ajax…)

In a plugin, I use ajax to get_option() which takes much longer than it has to because entire wp gets loaded. How do I set things up so that it (my ajax) loads only what is needed? (get_option())
0
votes
0answers
3 views

Custom sortable columns not clickable [duplicate]

I have attached several custom columns to the WP users which are displayed in the admin Users list. I have made the columns sortable in that I've set up the ordebry and order GET params to filter by ...
1
vote
1answer
1k views

Tax query AND/OR meta query

In my WP_Query I'd like to have a tax query and a meta query, but I want the results to include results that match the tax query AND/OR the meta query - if I do it like the below, then it only returns ...
0
votes
0answers
10 views

Wordpress/Gutenberg Toggle Saving, But Not Changing

I've been struggling to get my head around the new Gutenberg way of using React javascript to create a sidebar toggle. I have the text field saving and storing fine, and I have the checkbox itself ...
-1
votes
0answers
19 views

I want to make my own wordpress theme framework

I'm creating my own WP Theme framework. Please I want a function which the the user will use to select the sidebar she/he want ei left or right sidebar. and all WP query which I will use to select the ...
0
votes
1answer
15 views

Issues when changing == to ===

What am I missing... when using === in the code, the front end doesn't show an element at all until I disable and then re-enable an option in the WP Customizer. For example, I have a logo that can be ...
1
vote
1answer
22 views

Display link to taxonomy archive only if it has posts with certain custom field values

Posts on my site describe future events, with the event date recorded in a custom field in Unix time. Generally, only upcoming events are relevant to visitors. As such, I'd like to display ...
4
votes
1answer
20 views

RSS for Pages Instead of Posts?

I'm trying to set up RSS. However, all the pages on my site are pages, not posts because the SEO is better (all my content is relevant regardless of publish date). My RSS feed isn't working right ...
1
vote
1answer
4k views

Way to display media library in frontend

Is there is any php code to display the media library section in the frontend? The code should display the full backend media library section to the frontend,like I have the image filter according to ...
3
votes
1answer
1k views

how load content as pop-up using ajax

There's a way to use ajax to load the content from single.php or a custom .php like ajax-single.php like this page does it: https://yellowimages.com/all/objects/apparel-mockups/ also like them show ...
0
votes
1answer
16 views

Woocommerce - exclude only older out-of-stock items

Trying to find a way to exclude out of stock items from listing, but only after some time (let's say, if they're older than one month). I know I can exclude all of them easily, or change the order ...
1
vote
1answer
11 views

Update CPT post meta with update_post_meta and cron job

I'm attempting to regularly update a custom field ($company_rating) in a CPT with update_post_meta(). The cronjob is assigned and working. I've tested the function and it prints correctly (I've ...
0
votes
2answers
35 views

Change image using only CSS [on hold]

I'm using the twenty fifteen theme. I have a logo set using the WP Customizer. I want to have the image change on mobile or tablet view. The breakpoint is anything smaller than 59.6875em. I'm ...
0
votes
0answers
16 views

Gulp in Bootstrap child theme [on hold]

I'm a beginner when it comes to Gulp. I would use it primarily to minify CSS and JS. Is it possible to use it with a child theme? In this case, I'm using the WP-Bootstrap-Starter theme as parent. ...
2
votes
2answers
2k views

Add a query string to ALL links on site

Our client would like to embed his site into an iframe in their software backend. I get a query string on the first link but need to make sure that string persists across URLs for all links and ...
0
votes
2answers
12 views

I am not able to login to my wp-admin panel

I changed my Wordpress folder name in htdocs as localhost/ecom/ and now when I try to access localhost/ecom/wp-admin/ it shows page not found
1
vote
1answer
10 views

How can I add arbitrary `data-` attributes to a block's `edit()` container?

For example: Before: <div id="block-fc502ca9-0d7b-440c-959c-3da152db0192" class="wp-block editor-block-list__block" data-type="wordcamp/schedule"> After: <div id="block-fc502ca9-0d7b-440c-...
15
votes
4answers
59k views

wp_nav_menu(), how to change <li> class?

I'm building a menu for my website. The static is looking like this: <nav> <ul id="menu"> <li class="item_1"><a href="#">Item 1</a></li> <li ...
0
votes
1answer
19 views

Using featured image of blog archive page

On my custom wordpress theme, I am using the featured image thumbnail for all of my pages to be the header of the page. I've created a page called "blog" and using it as the archive ( via settings ->...
0
votes
1answer
1k views

Display Posts in Custom Post Types Timber

I am working on a Timber/Twig template and have created a Custom Post Type with a Taxonomy specific to that Post Type. $tour_labels = array( 'name' => _x( 'Tours', 'Post Type ...
0
votes
1answer
16 views

find out reason of “Updating failed” in Post-editor

In some cases, if there is issue in code or whatever, and try to update the post in Gutenberg post-editor, you will get "Updating failed" error message: Is there any way to debug/find out the reason (...
1
vote
1answer
12 views

Wordpress Multisite with different domains and themes

We want to set up a multisite Wordpress install on our main domain, let's call it "mainwebsite.com", as well as a number of other domains, let's call them "mainwebsite2.com" and "mainwebsite3.com" ...
3
votes
2answers
1k views

How do I order pages and categories by ID or name in the same query?

I would like to query most of my pages and categories on the homepage. So far I am able to get the pages and category (posts), but I cannot order the list the way I want to. I want to be able to get a ...
0
votes
1answer
14 views

correct validate inputs

How correct validate data from user to save in database from inputs? I use this for textfields: $name = trim(sanitize_text_field($_POST['name'])); But if i add special signs like "&*({} ...
0
votes
1answer
1k views

Excerpt Length & List Category Posts Plugin

I'm trying to filter out the excerpt by character length for a plugin called "List Category Posts". I've been trying to get the excerpts working for the past week, but nothing is doing the trick. The ...
1
vote
1answer
399 views

Display list of categories filtered by date?

I have a sidebar on our intranet which lists, hierarchically, posts by category. Such as: -- HR ---Events ----Picnic However, this list has gotten long, and some categories are no longer even used. ...
0
votes
1answer
692 views

plugin-list-category-post custom fields

I'm using list category posts and would like to display several custom fields, but not all together. I have used a template to display the list in a table, and have custom fields for country, county ...
1
vote
1answer
301 views

How to display a category from a specific post-type

I have a custom post type called "my_people" along with a custom taxonomy named my_people_categories. It is used to display a list of people. I would like to show only the people in the list that ...
0
votes
0answers
16 views

Woocommerce search pagination not working

I have a problem with the Woocommerce Pagination but only on the Search Page. On category sites the pagination links are working just fine. But on the Search Page the pagination generates links like ...
2
votes
1answer
6k views

Access post from post id in URL

I'm doing unit tests for my plugin, and in my unit test, I check some basic things such as posting a custom post type. My script can create new post, and I can retrieve the ID of the posted item (I'm ...
1
vote
2answers
5k views

Trouble with editing template for “List category posts” plugin

WP 3.0.4 local installation, multisite network enabled theme: Twentyten plugin: List Category Posts v .15, network activated I've created the folder list-category-posts inside my theme folder, and ...
2
votes
1answer
944 views

Add div to specific sub-menu

I researched in google, yandex but had no success. With this code I can set a div to sub-menu but this code add to all sub-menus, I just need to add div to specific sub-menu. class Megratron_div ...
1
vote
2answers
26 views

Using Javascript for Looped Content

I have set up a loop to pull in staff bios. When a user clicks on the thumbnail of the staff member a popup with the complete bio information for that "post" should be displayed. I have been able to ...
2
votes
1answer
409 views

List Category Posts: Output thumbnail and post title within a single link

I've been using List Category Posts for a while to output a basic list of links. I'd now like to make them look more attractive by including the thumbnail for each link and allowing them to scroll ...
0
votes
0answers
12 views

Get chars after last , (comma) country [migrated]

I want to get last chance of comma (,) in a $country. But how do I do it? foreach ($countries as $country) { $country_id = $country['ID']; $country = get_the_title().", "; //comma echo "<...
0
votes
0answers
10 views

When creating category, it creates automatically tag, or, when creating tag, it creates automatically category in same name

I have a weird problem. For example, when i create test category, worpdress is creating tag as test automatically. Or vice versa. I tried everything i know. 1) Disabled theme and plugins. 2) ...
0
votes
1answer
10 views

Delete ACF repeater field row on Front End

I would like to delete row from front end. This is what i did : HTML : <?php $row = get_row_index(); ?> <tr data-rownum="'. $row .'"> <td> <span class="deletecontrat ...

15 30 50 per page