Tagged Questions

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

learn more… | top users | synonyms (1)

0
votes
0answers
11 views

PHP version or config prohibiting script from working properly

I have a function that is working correctly on another site, but not on mine (the string is not being replaced on my site). Both sites are using the default 2012 WP theme and the same plugins. ...
0
votes
1answer
12 views

How to sort results from a custom database table

I've created a custom WordPress database table which I'm using to store 'likes'. The columns I have are: id post_id user_id I'm now trying to get an array of post IDs that a particular user has ...
0
votes
1answer
25 views

Change “en-US” to “en”

Hey I am trying to edit the WP theme files, and I am using bloginfo('language') to get the language of the page. However, it returns me "en-US", which does not work while redirect the page. The site ...
0
votes
0answers
12 views

grouping search results page by category (why wont this work?)

Any suggestions would be amazing; I just want to output the search results under their category names; so keyword search found under said categories just group under said categories on results page!!! ...
0
votes
1answer
10 views

search results based on categories or custom fields

So I have the below spitting out by post types; how could I edit to add custom field data to also populate? And or just categories? $categories = array( 'post' => 'Articles', ...
0
votes
0answers
14 views

create export .csv file for wordpress website (URL to be used as hyperlink)

Current code (without accurate db credentials) The below outputs as a blank page when triggered to download and I don't understand why.. I simply want the WP db to print in a .csv file -- currently ...
0
votes
0answers
23 views

Top author widget

I want to create a widget of top author. That widget will show 10 authors in ASC, and a link to their author page. This will be shown because of the amount of views that every author have, and then ...
0
votes
0answers
24 views

Wordpress installation permission errors

I'm getting "Download failed. Failed to write request to temporary file." when I try to download plugins, and the plugins (that were working) are now unable to write what they need to (namely a ...
0
votes
1answer
17 views

Custom user Site Managers in wordpress site

I have inherited a website with custom dropdown option to add user role 'Site Manager' this site manager is not defined in the functions.php file and I'm trying to find a way to access users that have ...
-1
votes
0answers
11 views

Wordpress Image Editor on Front End

I'm wanting to implement the wordpress Image Editor that is available when you upload images to the media library in the back-end on the Front-End. I have functionality in place already where users ...
0
votes
0answers
15 views

Different css font styling when a positive number is present in the HTML table using PHP&CSS [on hold]

Description On my front page I have a HTML table with 6 custom post types stats. The name of CPT and total number of published posts are in the first and second column and today registered posts in ...
0
votes
0answers
25 views

how to load post content when a post title is hovered using ajax

i have a wordpress blog and i need to make my posts content show up when vistor hover the title of the post on my index page with no need to get into that post , exactlly like in the following site : ...
0
votes
0answers
21 views

How to reference user role 'Site Managers' properly

I had the below working properly within Administrator but cannot use this functionality with Site Manager for some reason: I am seeking just to show unique content based on if user is logged in as ...
0
votes
0answers
5 views

Filter get_projects_category();

Is it possible to amend the <?php get_projects_category(); ?> to only get projects from specific categories? The previous code is populating a menu with category links, and I only want certain ...
0
votes
1answer
35 views

Create page with custom php script and fetched data

I created WP page and I need to show a table with some information. This information is hold in a database (hosted on the same server). To be more detailed, I'll try to split my question. I'm new to ...
0
votes
0answers
8 views

How to show contents at first site load when LoadPostsOnScroll=TRUE and PostPerPage=10 while PauseLoadingOfPosts=TRUE using Ajax load more plugin? [on hold]

I have been using for this plugin now and I liked it. Only, there is a little thing that I wanted it to work but seems the plugin can't do it by adjusting its settings. I think somewhere in its code ...
0
votes
0answers
14 views

Change Wordpress WooCommerce Redirect URL [on hold]

Right now all new registered woocommerce members are redirect to /my-account but I want them to be directed to a custom URL (for exaple I will use /update). I have tried many different codes but cant ...
0
votes
2answers
25 views

How to check if a string is a valid URL

WordPress provides a helpful function called is_email() which checks if a given email address is valid. Is there a similar function available to check if a URL is valid? I tried is_url() but that was ...
-4
votes
0answers
13 views

Can I get the checkout form into a template? [closed]

Hi I am using woocomemrce and was wondering would it be possible to get the checkout form and payment stuff onto another page? I want to create a template which will have a single product on and the ...
2
votes
2answers
55 views

How to search display_name column when using WP_User_Query

I'm using WP_User_Query to bring back a list of users. According to this article, I can focus the query on particular columns (I'm assuming in the wp_users table) using the search_columns param. My ...
0
votes
1answer
18 views

Next post link on a bootstrap button

Seems extremely simple but it doesn't work. Here is my code: <a href="<?php next_post_link(); ?>"> <button class="btn btn-default pull-right"> <span class="glyphicon ...
1
vote
1answer
67 views

Get the title before comma

I am using this code to return the title of the post on a gravity form field. add_filter('gform_field_value_page_name', 'page_name_filler'); function page_name_filler($value){ return ...
0
votes
1answer
39 views

display specific widget to a page

im trying to display a specific widget i need for the header current im using a code to display all widgets but my problem is that if I add additional widgets it will destroy my site. ...
0
votes
0answers
21 views

Install will not load: PHP does not have MYSQL installed

I'm having trouble installing Wordpress on my Windows 2008 R2 server. I'm getting the message: Your PHP installation appears to be missing the MySQL extension which is required by WordPress. To ...
-3
votes
0answers
9 views

How can I Stop woocommerce messages appearing on archive? [closed]

I have created a custom template which pull in product from two specified categories however when I add one of the products to cart no message will appear at the top of the page however if i go to an ...
-3
votes
0answers
19 views

Wordpress script to automatically get and post news feed [closed]

Please, does anyone have ideas on how to make a script to automatically post contents from urls I have set in it and post them on my site? Is there a plugin for that? I would have to work more like a ...
0
votes
0answers
11 views

Show value based on dropdown [duplicate]

I am trying to create a short code with a form I have the form displaying ok but I need to be able to pull the price information from sql table as well and show it in a label. How can i do that using ...
0
votes
0answers
20 views

select option with value count

i'm early for wordpress and php code. so, i have post type property with type ( apartment, house, villa, etc ). example, for type apartment any three property. but on select option, be like this : ...
0
votes
0answers
9 views

Tweak CDN linker plugin to work with multisite subfolder set up [closed]

The CDN LINKER PLUGIN unfortunately does not work with a multisite subfolder set-up. On the mainsite the plugin works great. Please do not recommend other plugins like w3 total cache - no appetite to ...
0
votes
1answer
15 views

Sort posts by custom fields value using dropdown menu

I'm trying to sort my posts by a custom field value, called price. Only using numbers in the custom field value. I want that the visitors of the website can sort the posts on price by using a ...
-1
votes
0answers
20 views

Embed Gravity Forms on external site (not WordPress) [closed]

I have a Gravity Forms (contact form) on my main WordPress site. Each form submission is stored in the Gravity Forms WordPress Backend. I would like to embed that form on other sites (not WordPress), ...
4
votes
1answer
25 views

How to create a test that calls is_front_page in phpunit?

I'm using WP_UnitTestCase but in my code I have this condition. is_front_page which I'm not sure how to simulate that in PHPUnit This is the piece of code that I have elseif ( is_front_page() ) { ...
-1
votes
1answer
15 views

Convert ACF checkbox choices to links [closed]

I'm using ACF (Advanced Custom Fields) to create a checkbox on a custom post. Does anyone know if it's possible to turn those checkbox choices into links? For example: Checkbox Results: ~ Red ...
1
vote
3answers
53 views

Change behavior of the <!--more--> tag

When I click "read more" at the bottom of one of my website posts, it just loads the rest of the text in the same page and the same section, thus overflowing elements with text and spoiling my layout. ...
0
votes
0answers
26 views

Radio buttons value not calculated and div not displayed on button click event

I have a list of index and in each index I have 3 fields indexno, indexname and parts. parts is parent and has sub fields partno, partname and partvalue. Each part is displayed as a radio button. ...
0
votes
0answers
13 views

get adjacent post by meta key and meta value

I'm trying to limit previous/next navigation to posts that have the same meta_value on a certain meta_key. I know this was asked before, but I couldn't pick a working answer. And all that I could come ...
-1
votes
1answer
19 views

Like/Dislike plugin crawler problem

I'm making new plugin where users can vote like/dislike my posts. But i have a problem with this plugin. Crawler bots can vote, and i don't know how to prevent it. Vote links have no follow, but i ...
0
votes
1answer
22 views

Show custom field if it exists, and show different elements if it doesn't

Basicly what I'm trying to do (with very basic knowledge of PHP): If Custom Field $randomname exists for that particular post, show the content of that custom field. If Custom Field $randomname ...
0
votes
0answers
14 views

How to edit plugin to only display on specific post types, instead of all posts and pages

I've installed a plugin (allows users to save favourite posts to a list: http://goo.gl/9LEvjy ) but by default it displays on all posts and pages. I want it to only display only on posts, NOT pages - ...
0
votes
0answers
10 views

Adding canonical tags manually to a page in wordpress

Hi Stackexchange community, I have a wordpress site where I have a main page for courses and a page for workshops. I want to add canonical tags on the workshop pages because most of the content on ...
0
votes
1answer
21 views

meaning of (array)function()

I saw this piece of code that have part of the code I never saw before. What is the behavior of (array) in this scenario? so far I know the way of creating arrays in php never see this. // ...
0
votes
0answers
10 views

Custom post type pagination [duplicate]

I'm trying to get pagination for a custom post type. I don't know what's wrong with the code but it doesn't work. This is what I have done so far: <?php $query = new WP_Query( ...
0
votes
1answer
44 views

How to pick “full/thumbnail” images in the loop?

I am picking the latest posts through the WordPress loop using the below code, but it's picking all images at full size: if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> ...
0
votes
1answer
42 views

How to call plugin path in JS?

I am using wp-store-locator plugin and I want to add plugin directory path to my JS. html = "<li data-store-id='" + id + "'><div><p>" + storeImg + "<strong>" + store + ...
0
votes
1answer
47 views

CPT Repeatable Fields + Undefined Index

I'm using this code here for repeating fields in a CPT (yes, I know of ACF and a few others), and have tried to add a third field. The field is currently displaying in the meta box, and is output on ...
0
votes
0answers
22 views

Manipulate database of WordPress site with my own scripts

I love WordPress as it provides plenty of great themes, good SEO and overall content management. But I'm not always happy with WordPress's original "Add post" and "Edit post" features as it required ...
0
votes
0answers
39 views

Autoloading a PHP class – working outside, but not inside WordPress plugin

I am thinking about using autoloading in a plugin. Outside of WordPress (as a test) it works as expected, but inside the plugin there are some problems. The directory structure I used for testing: ...
0
votes
0answers
20 views

How can I correctly POST to a Wordpress page?

I'm creating a timetable page for a community-run bus route planner/timetable site, and I'm currently coding a page where the user can select their desired bus from a drop-down list, and then PHP will ...
1
vote
0answers
100 views

WordPress Liveblog plugin: How to associate uploaded images with comments? [closed]

I'm using Automattic's Liveblog plugin which is also available on GitHub. Background When a user uploads an image, the following happens: a new post of post_type 'attachment' is created. a new ...
0
votes
1answer
22 views

WordPress custom field images not getting inserted into array

I am using Wordpress to create a dynamic gallery using Bootstrap. I created a new custom field and then set it to 'images' and then assigned it to my post type. It then shows up in my post, I uploaded ...