The server-side programming language that the WordPress core, plugins and themes are written in.

learn more… | top users | synonyms (1)

0
votes
0answers
8 views

Generate custom output for page/URL in a plugin

In my plugin, I want to be able to catch a slug - say 'testpath', as in www.mysite.com/testpath and output whatever I want from my plugin into the page. I in WP Admin I could create a page called ...
0
votes
1answer
25 views

Keeping the previous get value and add another value when submitted

I'm a super noob, so I'll try my best to explain. I have a blog page that I wanted filtered by category and I want the user to able to click on multiple categories and it will filter to show those ...
-1
votes
1answer
51 views

Passing javascript variable to php file

I can't find the best way to pass a JavaScript variable to use in a PHP file. I found this function wp_localize_script(), but it does exactly the contrary. Is there a way to pass a JavaScript ...
0
votes
1answer
13 views

If user is logged in not working

So I am trying to check if a user is logged in with the default WP function but it doesn't seem to work. Oddly, it works fine for people logged in (it echoes as it should) but it echoes nothing for ...
0
votes
2answers
25 views

load ajax using admin-ajax.php

The append result is 0, instead of a list with the title ass a link. If I check this locally (http://localhost/wordpress/wp-admin/admin-ajax.php?action=lateral_fluid), I get the titles ass a link. I ...
1
vote
0answers
19 views

bulk change of image setting “link to” to “link to: image url ”

i want every image present on my wordpress site with setting "link to: none" or "link to: post url" became in "link to :image url" ho make this for old post and for new post ? i tried this code in ...
0
votes
0answers
17 views

How to add a query string to all images?

My ISP has a cache server that cache all images and cause some problems and get on my nerves. So I decide to add some query string at tail of all image URL to prevent ISP to cache. Now I use this code ...
1
vote
0answers
15 views

Individual testimonial taxonomy not displaying (white screen)

I am using a testimonials plugin which is working fine except for when I try to view the testimonial entry as an individual page The plugin author suggested changing the testimonial slug and updating ...
0
votes
0answers
30 views

How send simple push notification from php in android

I want to send android push notification from php. I have created admin in php & mysql when admin approve anything from admin than send notification to user.
0
votes
1answer
18 views

Submitting my form to the database and then redirecting to payment site

I am submitting data to my custom table and would then like to redirect to a third party who will handle the payment. (not PayPal). I have the following code which adds the data to the database. The ...
0
votes
0answers
15 views

how to add description in custom photo wordpress, from front-end

I have an item block in fron-end, with it i uploud custom images, i want to add short description, that will look like this
0
votes
0answers
23 views

Can anyone explain this Widget output code?

I'm trying to read and understand a widget from a Wp theme. This widget basically allows the user to display up to 3 featured pages with their corresponding featured images or thumbnails. I ...
0
votes
0answers
36 views

WordPress prev next button in frontpage

Hi I have working pagination but if I'm using in static/frontpage prev and next button not showing or not working properly. If I add max num pages in next button it's showing but always going second ...
2
votes
2answers
74 views

List of posts by day of the week

I have Radio with programs and they are associated to day of the weak. Example: 1-Program Disco Nights plays at Monday and Friday 2-Pragram Crazy weekends play only at Sunday 3-etc 4-etc ...
0
votes
1answer
32 views

Facebook share button only share the_permalink(), without thumbnail, tilte, excerpt, etc

I'm trying to add socials to my post. I can share the post, but only the post URL. How could I share the post thumbnail, the Title, the excerpt, the author, etc. This is what i'm trying: HTML (in ...
0
votes
0answers
28 views

Add each Wordpress menu item into individual Bootstrap column

So basically what I'm trying to do is create a custom menu that has icons the user can add/edit. Each menu item has two pieces to it, the top has an icon and then the base has the name of the ...
1
vote
0answers
21 views

Custom Loop through category menu to include sub categories

In my custom wordpress theme I currently have the below loop to the main categories <?php $menu = wp_get_nav_menu_object('navigation'); $items = wp_get_nav_menu_items($menu->term_id); ...
0
votes
1answer
25 views

Jquery autosave text area after typing

I'm trying to learn how to use Jquery, and manipulate some existing code to do what I need it to do. I am wanting to edit this code to make an editablecontent text area save a certain number of ...
0
votes
0answers
9 views

if the image is smaller than the thumbnail, create anyway the thumbnail [duplicate]

I noticed that wordpress does not allow generating thumbnails if thumbnail size exceeds the size of the original image. Is there any way to prevent this? Bfi_thumbs plugin generates the thumbnail ...
0
votes
0answers
11 views

Latest Products Calling the Layered Navigation & Filters Dont Work

I have a empty category called latest-products. The categories have the layered navigation setup so that when a product is in the category the layered navigation works. I've been able to get the ...
0
votes
1answer
30 views

WooCommerce: Add Payment Gateway Field to Webhooks

I have created a custom Payment Gateway for a special EFT system we have setup. The Bank Account and Routing Number are supposed to get encrypted then sent to a Salesforce via the WooCommerce webhooks ...
1
vote
2answers
40 views

Display certain amount of posts on taxonomy archive page

I have a taxonomy archive page where I display everything under the term 'techno' I want to be able to limit this to 20 posts to a page until it paginates. At the moment it displays 10 on one page and ...
0
votes
0answers
42 views

How Can I lock function to prevent running multiple instances in one time?

I have written a plugin. There's a function int it that works with a DB table and (works on a data tree) ,I want if function starts running ,other instances lock until it finishes(then other instance ...
0
votes
1answer
27 views

WPDB - Read and write value from / to database

I have a custom field in usermeta called vatnumber. If the field has a value, how do I read that specific value for user X? Here's what I have so far: <tr class="vatnumber"> ...
0
votes
1answer
19 views

How to remove image on single product and get product to span page?

I'm using applay and have created some minor customisations with a child theme. I'm wanting to have a single product displayed without an image. I'm using this code in my theme's functions.php ...
3
votes
1answer
51 views

Correct regex for wp_embed_register_handler

THE GOAL I'm trying to parse a url and convert it to an embedded video player in my post's content but I think my regEx is off or I'm not creating a provider correctly. THE CODE Here is what I have ...
1
vote
2answers
44 views

What is a valid parent for get_terms()?

get_terms($taxonomy, array('parent' => $parent)); This works for some parents and returns an empty array for others. I checked if a term with the parent ID exists and if the same ID is in the ...
0
votes
0answers
25 views

Using wp_localize_script to output info from anchor text

I’m venturing into unfamiliar territory using a WordPress script that collects user data and saves it to the database, allowing administrator to access and manipulate that info. I need such because ...
0
votes
1answer
47 views

Paginated Comments “reply” does not work!

I use plugin Paginated Comments. I edit template and CSS in paginated-comments.php but "reply" does not work. "reply" does not appear at all. http://i.imgur.com/ieIeadO.jpg (There should be a button ...
0
votes
1answer
35 views

WordPress Custom Contact Form

So for my Custom Theme I've created a Custom Contact form and I have error messages but the thing is the error messages are showing even though it's the person first time on the page. Basically I only ...
1
vote
0answers
35 views

Change logo based on incoming domain

The agency I work for are trying to get a client's logo to change based upon the incoming URL. Now, we have 4 different URLs, therefore 4 different logos. Currently, we are using an if/else ...
0
votes
1answer
26 views

Display Content Based on Custom Field Value

I have the following code which is trying to show an image based on the value selected from a custom field in the admin screen. <?php if( get_field('bias') != 'Neutral' ) { ?> <img ...
0
votes
0answers
22 views

XML feed for Wordpress Social Board plugin modifications

At work, I've been tasked with modifying the Wordpress Social Board plugin by duplicating their RSS feed functionality to display an XML feed specific to our calendaring system. For example, this is ...
0
votes
0answers
23 views

How to tell where <title> tag is being pulled from

I'm working on a site, http://vibrantnation.com, and the meta info is jacked. I've looked in .header.php of both the child and parent theme, and it looks OK. I've checked plugins, like Yoasts' SEO ...
0
votes
1answer
17 views

When using shortcode, content stops generating after the_content

Yesterday I implemented a shortcode, but now my comments and related posts stop appearing. The source of a rendered page now only displays <div class="posts-group"> ...
1
vote
1answer
43 views

Some code in shortcode function being ignored

I have the following code that's part of the shortcodes for a plugin, and I've been trying to debug why it seems to skip a call to do_shortcode. To debug I've been trying to have it write to a log ...
0
votes
0answers
8 views

taxemony forech loop issue

I am trying to create tabs reviewing that child categories are in within the parent categories tabs tab heading will be the parent name and in that tab content will be the categories I tried to do it ...
0
votes
1answer
46 views

Reusable code that I can store in the function.php and apply to other templates as need. Dry Code

I am trying to apply reusable code to some single-posttype template and I was wonder if I can store the code somehow in the function.php and include it where i want to. Here is the code if ...
0
votes
1answer
9 views

the_post_thumbnail(); only works with fullsize images

The author of the theme, im using, used "the_post_thumbnail(array(120,120));" to define the thumbnail size. but for some reason, it only works with small banners (300x84), but i need those banners to ...
0
votes
1answer
42 views

how to make custom ajax handler?

i'm trying to make custom ajax handler because the admin-ajax.php is taking to long to handle ajax requests from 7s to 10s so i google it and mange to do some custom ajax-handler.php like this ...
0
votes
0answers
17 views

Edit PHP / “Categories Images” Plugin

I need to upload YouTube videos to one of the folders/categories using "Categories Images" plugin. I know it is designed to create a gallery of images only, but with the way the website is structured, ...
0
votes
1answer
11 views

Create 2-layered dropdown menus for custom taxonomy and custom post type

I want to display one dropdown menu with a list of values for a custom taxonomy. My taxonomy is "issue-year" and the dropdown would look like this: <select name="issue-year"> <option ...
0
votes
0answers
16 views

plugin development for woocommerce

i create this plugin: A discount in % for woocommerce price, but i have a problem: add_action( 'woocommerce_product_options_general_product_data', 'crele_add_custom_general_fields' ); add_action( ...
-1
votes
1answer
22 views

Get custom post fields and display them

I am using the wpfacet plugin. I have two custom fields: I am trying to display these by the following code: <?php while ( have_posts() ) : the_post(); ?> <span ...
4
votes
2answers
96 views

Why include a composer.json file with my plugin?

What is the advantage of explicitly including a composer.json file in my plugin if potential users of my plugin can already get it as a package through WPackagist?
0
votes
0answers
39 views

Warning: Invalid argument supplied for foreach() (custom post type)

Caveat: I'm a designer not a developer. I've created a custom post type called laptop. I've created a child theme of twentytwelve. I've set my front page to use the template laptops.php, which ...
0
votes
1answer
18 views

How to get property out of image object

Very new to php. i have the following var_dump($largeImage) that has the below output. I'm trying to get the thumbnail url. I have tried $tempLargeImage = $largeImage["url"]; $overlayImage = ...
0
votes
0answers
50 views

enqueue css in a wordpress plugin condition

I have found a bug in a wordpress plugin /plugins/woocommerce-eu-vat-assistant/ In checkout page if the option "Added possibility to make EU VAT field compulsory when the customer enters a company ...
0
votes
1answer
24 views

Custom User Registration script only allowing usernames with 16 characters

I'm noticing a weird issue on a custom User Registration page I'm using in WordPress. It seems as if WordPress will only accept usernames with 16 characters (NO MORE, NO LESS). The custom ...
0
votes
1answer
26 views

Why is it necessary to prevent direct access to included files?

Why is it necessary to prevent direct access to included files? For example: if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } I notice many plugins do this but I don't see ...