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

learn more… | top users | synonyms (1)

0
votes
0answers
16 views

How to overwrite Woocommerce template using Avada Child Theme [on hold]

I need to overwrite my-account Woocommerce template. In order to do so using child theme I tried the following solutions: copied my-account.php file from woocommerce/templates into ...
0
votes
0answers
4 views

Autodetect currency coding [on hold]

I have a task which require me to change the currency (like Smart currency converter) in real time and perfectly (updated with rates), i don't know where to start and how can i use WooCommerce to get ...
0
votes
1answer
20 views

Create server side text from wordpress page

I would like to store a wordpress page as text on the server for access in a custom application. Specifically I want a div of class '.entry-content' on a page url like below ...
0
votes
0answers
5 views

WPML. How to connect post translations from frontend form ( or throught php )?

My task is that user should be able to create posts from front-end. I'm using ACF plugin, for creating forms on front-end. My web is in 2 languages: Rus and Est. User can create on one of that ...
0
votes
0answers
16 views

File path for attachments outside of wp-content/uploads

I am creating some custom post creation pages with PHP. I create a simple post and want to attach an image I already have on my server to the post without moving it into the upload directory. I am ...
0
votes
1answer
15 views

php files not loading except for index.php [on hold]

I recently had to restore a public_html folder after an accidental deletion. Afterwards I can load the http://www.example.com/wp-admin/index.php but I cannot load any other php file such as ...
0
votes
2answers
15 views

How to add Post Tags to a new <meta> element in header.php?

How to add Post Tags inside a new element in header.php? I'm probably overlooking an obvious function in the WordPress Codex. I have tried adding these to header.php: <meta name="page-tags" ...
0
votes
0answers
11 views

Failed media upload: “The uploaded file was only partially uploaded.”

I am running Linux CentOS 5.8 and I have my web pages using WordPress 4.0. I am trying to uplad jpg photos to server via WordPress, but it randomly fails. I uploaded few photos, and then I get ...
0
votes
1answer
21 views

Adding css tweak based on page template

I have a parent page that is listing out all of it's child pages. This is done using the below: <?php $query = new ...
-1
votes
0answers
8 views

Woocommerce plugin to show all categories and products on one page [duplicate]

I have created a simple plugin to simply show all woocommerce categories and the products in it on a single page without pagination. Even though the simple plugin works, I think I am doing something ...
0
votes
1answer
24 views

wp wp_register_script function results type parameter missing

I used the following code wp_register_script('jquery', get_bloginfo('template_directory').'/js/jquery.js', false, '',false); wp_enqueue_script('jquery'); It includes the script as ...
-1
votes
1answer
29 views

Change an option string to a function [on hold]

I'm creating an options page for my theme where I can insert a code in a text field as a condition for displaying sidebars in my website. Let's say I'm inserting this value in the text input: ...
1
vote
1answer
13 views

Skt full width basic slideshow problem

Background: I am making a photography website and thought that skt full width is a good theme for the landing page. It worked out all right. Then I started to get fancy. I wanted my client to be able ...
0
votes
2answers
43 views

Display posts by month

I want to achieve something like this, I don't know if it is possible and what would be the best way to do it: The way I query the posts is like this: <div class="post"> <?php global ...
0
votes
0answers
4 views

Set featured image using wp_insert_post

// Auto post ( Unique File Date ). $postData = array( 'post_category' => array( $Category ), 'post_status' => $Post_Status, ...
0
votes
0answers
10 views

Embed google alerts rss feed into WordPress site

adjustment on my origonal question. How would I go about adding a new widget area to my current template so I can embed a google alerts rss feed? Cheers for any suggestions / solutions
0
votes
1answer
20 views

How to extract information from a wp_query result?

Background: I'm using a wordpress theme called skt full width. I am modifying their front page slideshow, so that it displays six random images instead of six pre-selected images. I have a custom ...
0
votes
1answer
17 views

How to get to a specific position in wp_query?

Background: I'm trying to display images in a slideshow, and I want to select those pictures randomly from the website's media. The image has a custom field in order to be selected for being the ...
0
votes
1answer
11 views

Two menus show up

If I set 'echo' parameters value to 'true': <?php if( has_nav_menu( 'primary-menu' ) ) { wp_nav_menu( $menuParameters = array( 'theme_location' => ...
1
vote
0answers
18 views

Selecting specific posts with an if statement in a counted loop [migrated]

I'm currently counting the posts in the loop... <?php $count = 0; ?> <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php $count++; ?> ...
0
votes
1answer
58 views

Pass important values server-side when processing form

I am working on a plugin that has the following within a <form> tag: <input type="hidden" name="postid" value="<?php echo $postid; ?>"> The problem with this is that users can ...
0
votes
1answer
18 views

How to replace URL protocol using PHP?

I'm using HTTPS everywhere in my website but I have problems with sharing buttons for Pinterest and Tumblr. For example, when I try to share image on Pinterest I get this error: "Sorry we could not ...
0
votes
0answers
19 views

AJAX call keep sending message

I'm working on a form from front-end which inserts a post via AJAX. Everything works fine but when I opened chrome's console in the wordpress-admin menu and click on the specific post type it keeps ...
-3
votes
0answers
38 views

Echo inside if tag [closed]

I'm trying to echo a value of an option inside 'if' tag, but it doesn't work. Here's what I want to achieve: $value = !is_home() // variable stored in an option if ( echo $value) echo 'not home' ...
0
votes
2answers
23 views

Disable Checkbox depending on state of another checkbox

I'm trying to disable a checkbox depending on the state of another checkbox. <form action="options.php" method="post" id="form_submission"> <table> <tr> ...
0
votes
0answers
17 views

How to create a php page to handle http request in WordPress

I want to have a page to handle the http request suck as xxx/app/api.php?id=7 and I create a php page in wordpress with redirecting by adding the following code to the end of the functions.php. After ...
1
vote
0answers
16 views

Trying to store submenu items to render out after main menu

I'm using a custom nav walker to render out the main menu, during this I want to store the second level navigation items to use/ render out later in a separate area of the page. I want these second ...
0
votes
0answers
14 views

Update table only if checkbox is clicked

I'm building a little home security project where it should be able to turn the system on/off from a website and by a password on the device. My problem seems to occur with the code from my website. ...
0
votes
1answer
52 views

Facebook php sdk 4 getSessionFromRedirect() always null

I have wordpress 4.1 with the following plugin installed: iThemes Security WordPress SEO I plugged in a function the facebook sdk. This is the code: //Footer add_action('wp_footer', ...
0
votes
1answer
17 views

ACF Unexpected T_CONSTANT_ENCAPSED_STRING [closed]

I'm running the Advanced Custom Fields Pro plugin. When I implement the following code for the repeater field, I get this PHP error: Parse error: syntax error, unexpected ...
0
votes
0answers
14 views

No increments in counter in wp-query [on hold]

I am trying to show related posts outside loop on a single custom post type post in an ordered list. I am using the below code but somehow it does not increment the numbers. <?php ...
0
votes
0answers
18 views

Wordpress search query

I used code snippet, from the plugin http://wpadvancedsearch.com/, which works very well, but when I press a search button, it generates the following string in the URL: /?search_query=& and I ...
0
votes
0answers
12 views

wp_title not showing for home page

ok so i tried this https://stackoverflow.com/questions/9055009/wordpress-wp-title-blank-on-index-page?answertab=oldest#tab-top and went to my function.php for my child theme and put the code in the ...
0
votes
0answers
30 views

Different ID in every shortcode

I am trying to make an Instagram-box on the author profile of my page. I need every profile to be different, and to do that I need to change the ID in my Instagram Widget-shortcode on every page. The ...
0
votes
2answers
30 views

Setting field not saving on front-end

I'm creating a theme option page and i try to display the values of two input in my front end : function register_my_header() { register_setting( 'header_options', 'header_options'); } ...
0
votes
0answers
13 views

Editing dashboard according to the userrole

I'm relatively new to PHP, I'm editing a plugin that restrict demo users with the role of (subscriber) from some capabilities, and it modifies the dashboard for the demo user(subscriber) and remove ...
0
votes
1answer
16 views

How to Display a List of Child Pages For a Parent Page in WordPress

I need to display child pages on my parent pages. i have a code that is working but i need to set some codes to only show specific pages like to only show visibility public not all the pages. this is ...
0
votes
0answers
19 views

Turn off Plugin Manually

I have installed and active wp-super-cache plugin, and It cached an PHP syntax error. I solved the error but can't run my website again because the error.log is still displaying the same error. I ...
0
votes
0answers
9 views

Avoid wp-load.php within a PHP/CSS file? [duplicate]

There was a similar question already but it uses ajax, and I am not. I want to have dynamic css in my theme, but I can't get the WP functions to work in my php/css file. In my functions.php file, I ...
1
vote
0answers
22 views

Media Upload , file name changed automatically

I face a problem that when i upload a video that named in non-english language , for example : Arabic , it placed in uploads folder with strange name Ùيديووو so it can't be access through ...
0
votes
0answers
11 views

Undefined offset from theme function with preg_match

I am trying to process ifttt [source_link] shortcode with function I found around. It works, but annoys in admin page with this error code: Notice: Undefined offset: 2 in /home/.../functions.php ...
1
vote
1answer
37 views

Advanced Meta Query for Large Calendar Website (12k+ posts) (175k+ wp_postmeta rows)

The Problem On a site I built, I opted to use custom fields instead of a calendar plugin to organize my posts in a "calendar". In the beginning this seemed like the most logical way to accomplish ...
0
votes
0answers
24 views

Using an iframe/plugin outside wordpress

I have Wordpress installed on my website, which I normally edit in dreamweaver. I use a few plugins in wordpress that are extremely useful; normally these generate their own page and I either use an ...
0
votes
0answers
14 views

Adding category in wordpress - custom

// Auto post ( Unique File Date ). $postData = array( 'post_category' => array( '0' ), 'post_status' => $Post_Status, 'post_type' => $Post_Type, 'post_date' => ...
0
votes
1answer
22 views

Problem adding class to body_class

I am trying to add additional classes to <body> based on certain conditions, so I have this code in my functions.php file of the theme : add_filter( 'body_class', 'custom_body_class' ); ...
0
votes
1answer
21 views

A Space being added to url generated by custom plugin

<?php /* Plugin Name: Convert Comment tag to link */ add_filter( 'comment_text', 'mh_commenttaglink' , 5000 ); function mh_commenttaglink( $text ) { // RegEx to find #tag, #hyphen-tag with ...
0
votes
0answers
11 views

Prevent multiple attachment with the same image

The plugin is designed to grab the user images from Instagram and insert them into media library, everything works fine on this part. I have set a transient with user selected refresh rate to check ...
0
votes
3answers
51 views

Execute a function every hour in the background

I'm in kind of a weird situation (for me) My client has a website that runs on a custom CMS He wants an online site that loads some data from the existing database. This is an external MSSQL database ...
0
votes
1answer
14 views

if has theme mod

Does someone know how to write the next line in wordpress PHP, because i'm not that great with PHP. If_theme_mode has content echo { my content } else { other content }; thnx
0
votes
2answers
12 views

Only load certain artists on this page

I have a wordpress page which loads all the artists in two columns... here is what I believe to be the relevant bit of code <?php global $paged; if ( is_front_page() ) { ...