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

learn more… | top users | synonyms (1)

0
votes
0answers
14 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?

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
16 views

Wordpress script to automatically get and post news feed

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
18 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

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
11 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
14 views

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

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
19 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
0answers
16 views

How to add size attributes to wordpress ACF image loop? [on hold]

I am simply trying to use a medium thumbnail size for the background-image in my advanced custom fields gallery. I am fairly new to wordpress and understand conceptually what I need to do, however I'm ...
-1
votes
1answer
12 views

Convert ACF checkbox choices to links [on hold]

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
49 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
18 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
9 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
14 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
20 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
7 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
8 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
30 views

How To Pick “full/thumbnail” Image In A WordPress Loop?

I am picking WordPress latest post through WordPress post loop for that I am using the below code but in this its picking all images at full size. <?php if ( have_posts() ) : ?> <?php while ...
0
votes
1answer
39 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 + ...
-1
votes
0answers
22 views

Polylang language switcher drop down not working [closed]

i have this polylang language switcher plugin on my site 2 of the shortcode works but for the drodown its not working. <?php // WORKING ?> <ul><?php pll_the_languages(); ...
0
votes
1answer
45 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
15 views

Getting WordPress to recognize ActionScript [closed]

I have a flash video that I have embedded on my page using SWFObject. From reading around I discovered that in order for the flash video to be controlled via Javascript I need to enable ...
0
votes
0answers
20 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
32 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 ...
0
votes
0answers
31 views

How to show the wordpress post on grid format? [closed]

So, I used below code for showing the grids of post on wordpress. <div id="gridcontainer"> <?php $counter = 1; //start counter $grids = 2; //Grids per row global $query_string; //Need this ...
1
vote
0answers
99 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
20 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 ...
0
votes
0answers
30 views

Need to figure out a way to display a schedule grid sorted by day, time, and location using custom fields [closed]

I have a custom post type of films using Custom Fields to store the date, time and location in separate custom fields. I need to display a grid where the posts are sorted in a grid for each day and ...
-1
votes
0answers
30 views

php header force download file automatic upload local pc selected folder [closed]

Anybody help me one php code solution. I want to php header force download file automatic upload local pc selected folder. My force download code done but force download can't upload selected folder. ...
0
votes
1answer
35 views

Why isn't the canonical link element used for all pages?

The canonical link element isn't set for all pages. For example, if I look at the source code for a post, I can see the following in the <head>: <link rel='canonical' ...
0
votes
1answer
17 views

Modify php code to pass a page id as a parameter in order to create a breadcrumb

I use a function to create the breadcrumb in my pages and it works: function the_breadcrumb() { $currentBefore = '<li><a>'; $currentAfter = '</a></li>'; if ( ...
0
votes
1answer
21 views

Load slideshow.css file only if Slideshow is checked / on

I use <?php if ( get_option('mytheme_slider') == 'checked') { get_template_part( 'partials/slider/slider-java-script' ); } ?> to include the slider-java-script.php template part into my site. ...
0
votes
0answers
12 views

Possible to remove settings from wp_customize?

So, really basic setting here. function Ari_customize_register( $wp_customize ) { $wp_customize->add_setting('header_position', array()); $wp_customize->add_control('header_position', array( ...
0
votes
1answer
18 views

If tag equals then show else show

In my WordPress I have a page template called: single_jobs.php In the template is shown a contact formular. Linked in the template file like this: <?php echo do_shortcode( '[contact-form-7 ...
0
votes
0answers
29 views

Global Variables Reset After Form Submit Wordpress

I am making a spam prevention program by randomly generating sums to answer. When I try to access the value after the form submits, it does not exist. I declared global variables inside function.php. ...
0
votes
1answer
27 views

media-uploader insert into post is not inserting

I have created a plugin for custom logo and its working fine, but when I tried to add this functionality into my exiting theme options its not working. I have this js code. ...
1
vote
1answer
18 views

WordPress update_post_meta updating with empty meta_value field [closed]

I'm usuing custom fields pluging and my code has to fill them automitcally, everything works fine except 2 strings: The way i'm getting the fields: foreach($postMeta as $key => $dataTmp) ...
0
votes
0answers
11 views

Modification to admin bar Site Name does not change from one network site to other

The wordpress admin bar has a 'Site Name' section, that when clicked takes you to the dashboard if you're on the front end, or vice versa. The sitename code for the admin bar can be found in ...
0
votes
0answers
17 views

How to correctly add the featured immage (thumbnails) support in a WP theme? Why I can't add a featured immage?

I have developed this custom WP theme: http://www.asper-eritrea.com/ As you can see into the post excertpt (in the home page) it is showed the first immage into my posts. To do it I use this code: ...
0
votes
0answers
12 views

Wordpress hook to add content under title or post status buttons on edit.php

I'm looking to add some content above the wp_list_table for a custom post type. I have custom bulk actions and filters but would like to add some further content to this header area. I cant seem to ...
0
votes
2answers
27 views

How to make blog post entries appear as input form instead of just text?

I want my blog posts to appear inside of a form input box instead of just text on a page. Not the title, but only the submission. Is that possible. My index.php: <a href="<?php the_permalink() ...
0
votes
0answers
9 views

Splitting of Page

I have opted to go with a single page layout with custom fields. However is becomes tedious to scroll down the page to edit content at end. As such I would like to split the page into smaller parts. ...
1
vote
1answer
30 views

Remove wp_admin_bar fail on wordpress 4.0

The following code is out of date, can anyone help me update this code? if ( !current_user_can( 'manage_options' ) ) { remove_action( 'init', '_wp_admin_bar_init' ); }
0
votes
1answer
17 views

Creating a Category Taxonomy

I have this entertainment site for TV shows. I cover at least 27 shows so far. I use so many different post types for the shows and it slows down the site, I eventually want to add more shows. I ...
0
votes
0answers
19 views

Editing a user info gives me error : Invalid User Id

As the topic says , when i try to edit a user's field ( name , email etc ) and click update it gives me an error saying invalid user id. I have no idea what i am looking for the fix it. If you ...
0
votes
0answers
21 views

Page 2+ of taxonomy archives does not recognise sort-order from dropdown

I'm using a custom taxonomy archive and I want the user to be able to organise it by 'latest' or 'alphabetical' along with other custom fields in a dropdown form. Seems to be working fine on the first ...