All Questions

Filter by
Sorted by
Tagged with
1 vote
0 answers
51 views

Unset actions for terms parent only

I'm trying to unseting actions for Parent terms only but unsetting the action "view" doesn't work. Terms is always clickable. Here is what i'm trying to do : Edit 'Code got malfunctions don't use ...
FloJDM's user avatar
  • 164
0 votes
1 answer
97 views

Can we use a library under MIT license in a WooCommerce plugin?

I am in the process of developing a WooCommerce Plugin, and I plan to make two Free and premium versions. I want to join The Bootsrap library which is under the MIT lisence. In the WordPress officle ...
Younes.D's user avatar
  • 162
0 votes
1 answer
326 views

Cannot access wp-admin after migration to another place

I've been working in my blog. Yesterday I made all back-ups (files and DB), i´ve changed the wp-config.php with the new user, DB name and password and I publised everything at my actual URL. http://...
Állan Fidelis Toledo's user avatar
0 votes
1 answer
921 views

Issue with custom loop in Archive page

I customized my loop in archive.php to display 8 posts per page. However I have an issue passing the args: the loop displays all my posts from all my categories. Here is my PHP code for the loop: &...
Mathieu Préaud's user avatar
0 votes
0 answers
3k views

Update WooCommerce stock status with SQL query if stock value is greater than 0

I'm attempting to update a large product catalogue using a SQL query via phpMyAdmin if: the _stock_status = onbackorder the _stock > 0 Queries attempted: Update wp_postmeta Set meta_value = '...
UncaughtTypeError's user avatar
0 votes
0 answers
43 views

Updatable theme developing

I made a wordpress theme and I want to sell it and support the theme for a time so I need update the theme.However I dont know how to do it? Also I wonder if I make new version as full theme, Will ...
Faruk rıza's user avatar
1 vote
1 answer
876 views

How to update a row in a table in Wordpress

I have a table of data rows. Now I want to click on the Update button then that row of data will be Updated based on the ID Here is my demo: These are my commands: <?php foreach ($...
Tung Nguyen's user avatar
0 votes
0 answers
213 views

Ordering by ACF custom field vaule

I'm using ACF field for post ordering. Now I have positions for 1-5 for post display, so you can select on which position post should appear. Only thing that I can't achieve right now for example is ...
damirk's user avatar
  • 1
1 vote
1 answer
3k views

How do we update a custom file upload field with the Advanced Custom Field plugin?

... $filename = mt_rand( 100,999 ) . '.pdf'; $post_id = wp_insert_post( $post_data ); if ( $post_id ) { $pdf_field = get_field_object( $fields['pdf'], $post_id, false, true ); $fields = ...
Muhammad Asif Mohtesham's user avatar
0 votes
1 answer
210 views

Menu links URL with PHP GET method

Hello the community, I would like to know if is it possible to generate menu links using the PHP Get Method instead of the regural one used in Wordpress? e.g : www.mybeautifulwebsite.com/category/...
Gerald's user avatar
  • 1
0 votes
1 answer
25 views

I'd like to be able to programatically setup a site to discourage crawling by search engines

I'd like to believe this would be in wp_options, but I can't find the right field.
Bret Weinraub's user avatar
0 votes
0 answers
122 views

Wordpress - WPBakery - Near Footer jump issue

I have a wordpress site @ https://www.oxygenband.com/ and got a page jumping issue @ https://www.oxygenband.com/wedding-music-band-in-chennai/ When you scroll to the bottom of the page above footer, ...
saiy2k's user avatar
  • 101
1 vote
2 answers
610 views

When using the_author hook, how can I determine the PHP file that generates each call to `the_author()`?

the_author() filter hook can be used to modify the output of the_author(). When using the hook, is it possible to know which PHP file generates which call to the_author()? For example, say I have ...
cag8f's user avatar
  • 1,937
0 votes
1 answer
29 views

Ascending numerical sorting with non-numerical characters last

I would like to return search results in ascending order according to their numerical 'start date' value (e.g. 1970, 1971 etc.). However, some results do not have a value for this field and instead ...
gubu's user avatar
  • 1
2 votes
1 answer
1k views

Gutenberg – How to prevent block from being deleted and reordered/moved

I have a post type which is prepopulated with a Gutenberg block: function blog_block_template() { $post_type_event = get_post_type_object( 'event' ); $post_type_event->template = array( ...
user1706680's user avatar
0 votes
2 answers
7k views

How to include a JSON file on my page?

I have a JSON file stored in my child theme directory: file.json). Separately, the PHP template for my page contains some JavaScript code (in the form of a <script> tag). In that JS code, I ...
cag8f's user avatar
  • 1,937
0 votes
1 answer
349 views

category/category_name pagination 404 error

<div class="row"> <?php $currCat = get_category(get_query_var('cat')); $cat_name = $currCat->name; $cat_id = get_cat_ID( $cat_name ); $paged = (get_query_var('paged')) ...
erzen's user avatar
  • 103
1 vote
0 answers
25 views

Add custom links like functionality

I want same functionality like WordPress provide for custom links but additionally I want to add some class to those links by default that is added by this feature (Other websites). I have tried to ...
Dhaval Panchal's user avatar
0 votes
1 answer
214 views

Custom meta box is not displaying value showing tag as empty

I have a created a custom meta box plugin and a function in the functions.php file to output the value on the page. The meta box seems to be working, however the input text is not being displayed on ...
Krys's user avatar
  • 135
0 votes
0 answers
435 views

Remove pre and code tags from WordPress

WordPress has added both <pre> and <code> tags to my PHP embedded in a post. Here's an example <pre><code>register_taxonomy( 'Books', 'post', array( 'label' =&gt; __(...
Brad Dalton's user avatar
  • 6,936
0 votes
4 answers
2k views

Enqueue custom css file on specific page

So I've been messing with this for a while now and I don't understand how I'm unable to pull in my style file properly by registering and calling it at all. Here is my method: public static function ...
user avatar
0 votes
2 answers
1k views

Custom Taxonomy Not Showing in Front-End When Outputting a Custom Post Type with WP_Query()

I have a custom post type that I'm importing into the front page of the site with WP_Query(), but I can't seem to get the custom taxonomy to show. I've placed a div in the HTML and inside this I'm ...
pjk_ok's user avatar
  • 908
1 vote
1 answer
710 views

Use WP_Query() to Output the 4th to 6th Most Recent Posts of a Custom Post Type

I have a front page of a site that consists of different custom post types. To achieve this I've been using the WP_Query(); function. In the example below, the query is used in a section and ...
pjk_ok's user avatar
  • 908
3 votes
1 answer
1k views

Is it safe and good practice to use do_shortcode to escape?

We're using Advanced Custom Fields in our company and sometimes we need to use shortcode in our custom fields. In the php code we then use the do_shortcode functions for these fields. There is no ...
maysi's user avatar
  • 143
-1 votes
2 answers
189 views

How to automatically convert "normal" conditions to yoda conditions

I am working on a large WordPress Plugin. It has already more than 10'000 lines of code (PHP + Javascript) and must be changed to yoda conditions, for matching the coding standards of WordPress. Is ...
Milli's user avatar
  • 19
1 vote
1 answer
25 views

Interrupting $html.= ' for IF statement

Hi Stack Exchange Community, I'm looking to understand how to insert an IF statement inside the code below: $html.= '<span class="cat">In <a href="'. $typeLink . '">' . $terms_string . '&...
imcamelliott's user avatar
0 votes
1 answer
444 views

I am trying to add current logged in user to my zoho chat

I am trying to get user info auto populated into the chat fields so logged in users don't have to type in their information everytime they want to chat with us. I cant seem to figure out how to make ...
Sebb's user avatar
  • 3
0 votes
1 answer
85 views

Iterating through Object Array to customise display of full custom taxonomy for custom post type

I have read similar questions but I'm not getting a complete understanding of how to make this work. I have created a custom post type and for it a custom taxonomy called kernal_category. I am ...
James's user avatar
  • 119
0 votes
0 answers
456 views

Translatepress taxonomy and custom post type root FIX

I'm using Translatepress. Great plugin, one exception: they haven't developed translation for taxonomies and custom post type root slugs. Does anyone know how to achieve this? Some .htaccess magic ...
Alvaro's user avatar
  • 31
0 votes
0 answers
40 views

No comment Section but still got a Comment

Somebody commented on my blog article, but I dont have a Comment Section on my blog. Also my blog is in german and the comment was in english. I'm not sure how this is possible and how this could ...
Niqql's user avatar
  • 53
0 votes
0 answers
50 views

wp-cli setting home and siteurl to site.tldtld (double TLD)

I'm installing Wordpress with wp-cli. The installation works without failure but it's setting siteurl and home to http://cbdhut.homehome. The command I'm running to install are: cd ${webroot} ./wp....
BugHunterUK's user avatar
0 votes
1 answer
105 views

How to filter result set in custom metaboxes?

I am adding a plugin that adds a custom meta box on the admin woocommerce product detail page. What this does it lists the completed orders that contain the product. I was able to successfully add ...
pmb88's user avatar
  • 1
1 vote
1 answer
426 views

How can I make 2 plugins that include different versions of a framework to both use the latest version?

I have a Framework 1.0 version git repo which is required via composer on my main Plugin. All work fine but once I create a second plugin that will use the 1.1 version of my Framework, how can I make ...
stergosz's user avatar
4 votes
1 answer
936 views

How to set column widths in a CPT block template?

I have a block template for a custom post type. When the WP Core column block added support for different widths, I tried setting up the template like so (I changed the post type to "post" here in ...
WebElaine's user avatar
  • 9,475
0 votes
1 answer
232 views

Why wp_ajax hooks doesn't work?

I need to execute the Php function from my Ajax form with the POST method. Is there another way instead of ajax hooks? Hooks doesn't execute. Always returning 0. What's wrong? Here's my ajax.js '...
Predaytor's user avatar
0 votes
1 answer
499 views

URLs Added to ACF Repeater Field are not working

I have created a page using the "Advanced Custom Fields" Plugin and everything is working great except that when I add href url in the field text it doesn't show nicely on Front-end and break the ...
Sheryl's user avatar
  • 42
0 votes
1 answer
85 views

Use custom template on custom post type

So I'm kinda stuck on something that I'm trying to achieve and unsure how to even target it, so below I will explain all that I have and what I have tried. So I'm using the Genesis Framework and a ...
user avatar
2 votes
1 answer
2k views

get used blocks in post and detect changing

in gutenberg how can I get list of used blocks in the post by javascript ? then I want whenever content of each block changed , a javascript function called. how can I do this ? wordpress gutenberg ...
saeid ezzati's user avatar
0 votes
0 answers
2k views

WooCommerce | AJAX | Product Pagination | Help me implement Ajax Pagination

Im struggling to find a good resource on implementing my own AJAX product pagination onto products within the WooCommerce shop loop. Please can someone guide me on how is best to load more products ...
Jason Is My Name's user avatar
1 vote
1 answer
657 views

Two different inner shortcode under shortcodes or multiple nesting of inner shortcodes

<div class="eternal"> <div class="one"> [shortcode]Some text 1[/shortcode] [shortcode]Some text 2[/shortcode] [shortcode]Some text 3[/shortcode] [shortcode]...
WordCent's user avatar
  • 1,877
0 votes
1 answer
37 views

'Simple' Reservation System

So I'm building a website where I present a list of locations people can read about and visit. Fairly simple you would say. But besides these locations, there are activities you can do at these ...
Toasty's user avatar
  • 1
1 vote
1 answer
3k views

Redirect based on parameter in url

I want to redirect my site to the correct url based on parameter. The url is passed when changing the language of the site using the language switcher. If url contains lang=de, then redirect to ...
Marco V's user avatar
  • 113
0 votes
1 answer
1k views

How to display SQL query that ran in WC_Order_Query?

Using WP_Query you can do: (new WP_Query($arguments))->request to get the raw SQL code that was executed. But how can you do this with WooCommerces WC_Order_Query or wc_get_orders?
FooBar's user avatar
  • 444
0 votes
0 answers
32 views

I am trying to Implement a Code that is Working in my previous page but not working in Wordpress for some reason

For some reason the Console says that the "jQuery is not Defined". And it is not working... And here is the Code: CSS: body { background-color: rgb(176,176,176) !important; } .opala { ...
Валери К.'s user avatar
0 votes
1 answer
27 views

imported post image as normal image instead encoded image

i wonder if i can imported post image as normal image url instead encoded image, when i export-import posts (contains image) from one to other wordpress using wordpress importer, every post image ...
Arief Widyasasmito's user avatar
0 votes
0 answers
27 views

Wordpress Portofolio Conditional Templating - functions php

I'm trying to load some code depending on which portfolio category i am , but cant seem to get it quite right... I've read that portfolio categories are called taxonomies, but don't know if thats ...
Pedro Ferreira's user avatar
0 votes
2 answers
451 views

do_action not working in loop

I've been using do_action to generate multiple action hooks in the loop. It seems unlucky for me the do_action not working. function ltc_generate_input_fields($fields = array()) { echo "Hello ...
Kimsea Sok's user avatar
0 votes
1 answer
501 views

Creating custom meta box throws PHP warning error in WordPress

I am trying to create a meta box as a plugin in my WordPress test website. I am using an installed custom theme from a tutorial I am following from Udemy called, 'WordPress E-Commerce Development w/ ...
Krys's user avatar
  • 135
0 votes
1 answer
55 views

Add a metabox when editing a media - but only for images

Is it possible to add a metabox for medias (attachments), but only if they are images ? I don't want this metabox on other file types. Thanks
gordie's user avatar
  • 492
2 votes
1 answer
1k views

Filter medias from the Media Uploader (wp.media) modal with a post meta

I would like to have a media uploader modal that displays only image medias having a specific post meta, let's say 'my_image_meta'. How could I achieve this ? Here's my actual code, which just filters ...
gordie's user avatar
  • 492

15 30 50 per page
1
384 385
386
387 388
2326