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

learn more… | top users | synonyms (1)

0
votes
0answers
256 views

solved - wp-admin/index.php gives a "500 Internal Server Error

experts, UPDATE: hello dear experts UPDATE. many many thanks for the great ideas and tipps. overwhelming - really your are overwhelming!!! i have done as adviced and this method made it clear. i ...
0
votes
1answer
28 views

How to get the slug of the homepage when editing it in WP admin?

According to the WP_Class reference, $post->post_name holds the value of the slug of the current page being viewed. If I'm currently viewing the WP admin edit screen for my homepage as set under ...
0
votes
1answer
25 views

Search page results conflicting logic - Search result caching?

I recently stylized my search page results from the base template _S, and got everything to work quite nicely. I've developed it to return false/positive header/body. It should only return a positive ...
0
votes
1answer
52 views

wordpress admin part is not accesbile after server shifting

one of my site's wp-admin is not accesible but the site front part is loading. This happens after i accessed the site from my new server second time. at first nothing happens and i can logg into ...
0
votes
1answer
50 views

Wordpress Staging and Testing of Plugins Best Practices

I'm just being testing a lot around for pagespeed. Doing this on a live system is a pain since you only can work between 2am to 7am. I do have employees creating content on the live system also ...
3
votes
1answer
101 views

How to get the custom header image's alt text?

I'm using a custom header in my theme. My aim is to add an alt attribute to my custom header img element. My img element so far looks like this: <img src="<?php header_image(); ?>" ...
3
votes
2answers
157 views

How to correctly add Javascript in functions.php

I would like to remove some ugly looking arrows that are standard on cart buttons in WooCommerce. To achieve this, I found a tip of adding the following code, which should remove the arrows when the ...
1
vote
2answers
70 views

Guidance with The Loop for CMS

Maybe I'm going about this the wrong way but this is my scenario... I would like to use WordPress as a CMS rather than a blogging platform. I have a website that will have somewhere between 25-50 ...
0
votes
0answers
38 views

Wordpress Custom Post Type and sort by Tags

I am currently making a custom Wordpress theme, but so far I am stuck at this little problem. I have created this custom post type. And in that page (media.php) I want to be able to click on the tags, ...
0
votes
1answer
33 views

Setting a default thumbnail url if no thumbnail

I have created a code to get an existing post's thumbnail and echo the url, but I would like to be able to have it get a default url is the post doesn't have a set thumbnail. Any help would be ...
1
vote
1answer
181 views

Run a filter when a walker runs

Is there any way to run a particular add_filter function whenever a specific Walker_Nav_Menu class runs? The function always needs to run when the walker goes, and I'd like them to share variables, in ...
0
votes
2answers
82 views

Resize Image without cropping

Currently I’m working on a WordPress plugin and as part of it users can upload Images. What I want to do is that these uploaded images of any size will be resized to 100px by 100px without cropping. ...
0
votes
1answer
37 views

Adding custom tables to Wordpress

I have a database which has thousands of rows of data in each of the tables. I would like to migrate this database into a Wordpress website. I would like the user to be able to log in to Wordpress ...
0
votes
1answer
25 views

Shortcode for a Series of Elevating Image Files, Excluding a Range?

I'm not sure if shortcodes have the capability of doing this and could not figure out how to do it on my own. Is this even possible? I have a series of images in several folders outside of WP. They ...
0
votes
0answers
104 views

using ACF datepicker to filter posts on a page

i’m using a wp-query to display posts from a category on a custom post type page. it works fine, and I’ve been also abble to sort my posts depending of datepicker field called “date_debut”. my posts ...
0
votes
1answer
42 views

On selecting shortcode generate selected shortcode table inside page editor worrdpress

i want to create a different different shortcode while choose particular shortcode relative table is show on page editor for example when user choose [some_random_code_sc] that shortcode then relative ...
0
votes
1answer
92 views

Add php function into .js file (for tinyMCE button)

I am creating a tinyMCE button for the wp WYSIWYG editor. Basically what happens is when a use clicks on the button a modal form pops up and they have to enter a few fields. However One of the fields ...
0
votes
2answers
52 views

Capitalize Shortcode Value on Output

I wrote this shortcode to take a filename I specify and output it as an image with title and alt tags: function cwc_pkmn($atts) { extract(shortcode_atts(array( "name" => 'http://', ...
0
votes
3answers
36 views

Add a variable in functions.php and call it in single.php

I am new to PHP and am building a WordPress theme. I would like to add a variable in the functions.php and use it in single.php as an if statement. At present, my single.php has the following code - ...
0
votes
2answers
57 views

Replace Post-Title with variable

I want to set a custom post-title with a custom-field meta in my Wordpress Theme. The user will add a new post to the post-type. When they do they will only see the "Title", "URL", and "Publish" ...
0
votes
0answers
20 views

how to get wordpress categories list with thumbnails?

i am trying to get thumbnails list with their thumbnails images .i tried code below but it only gives categories list . i know there a could do using feed_image but i can't figure out how to do it ...
0
votes
0answers
44 views

Wordpress and advanced custom fields subcategory inherit category color automatically

Hi is it possible if I added a subcategory and inherit the parent category's color? currently im using advanced custom field plugin. i dont know to show it inthe front end that if the user left the ...
0
votes
1answer
42 views

Replace shortcode in substring

I've created these two functions to toggle between the first paragraph of the content and then everything but the first paragraph so when the user selects 'More' it slides out the article smoothly ...
0
votes
1answer
28 views

Adding theme support for a custom header image

I'm using add_theme_support( 'custom-header', $defaults ); to support custom header images in my theme. The $defaults are described in the Custom Headers article $defaults = array( ...
0
votes
0answers
99 views

Pull latest Youtube Video from json url and make new post

I am trying to automatically "add-new" Wordpress post when a Youtube User uploads a new video. Using wp_insert_post(); I can echo what I need to, but how do I write a function that determines: "If ...
0
votes
1answer
37 views

Uploading files using the Settings API

I've used the Settings API in the past to output text inputs and checkboxes but am unsure if I can use file inputs. My add_settings_field() is: add_settings_field( '1', 'File 1', array( $this, ...
8
votes
1answer
579 views

Mega Menu Walker

I'm trying to create a mega menu walker. Unfortunately, walkers completely escape my coding knowledge. I could really use some help getting it working. Here's the features I need: Wrap the ...
0
votes
1answer
52 views

Wordpress loop is not working

Can anyone tell me why this wordpress blog is looping the header and banner over and over? It seems like instead of just looping the post it is looping the whole page. This code is inside of my ...
0
votes
0answers
33 views

How to extract URLs from wordpress taxonomies

I am in quite a trouble. I need to extract all possible url from my wordpress blog be it of post, tag, category or anything else after domian-name.tld/*. I tried my hand on few available codes and ...
0
votes
0answers
25 views

Contact form with dynamic recipient

I am creating profiles of people where each person is a custompost; I need my customposts have a contact form send mail to different recipient. I have already created a Metabox in which to put the ...
0
votes
1answer
148 views

implementing a jQuery “click to expand” link in Wordpress [closed]

Novice coder - apologies for any stupid comments I've been trying to make a show more button on one of the div s on my Wordpress blog page. I've looked at a number of tutorials that all seem to agree ...
0
votes
0answers
10 views

Fluid full window width carousel Image Problem in WordPress [duplicate]

Slider link:- http://coolcarousels.frebsite.nl/c/2/ Here is my HTML script for the slider- <div id="wrapper"> <div id="carousel"> <img src="<?php echo ...
0
votes
0answers
28 views

Adding fields to user profiles, modifiable only by admins

I'd like to create a field called "Subscription" on user profiles that would have one of three values : "Active", "Out of date" and "Inactive." In the form of a dropdown ideally. I would like this ...
0
votes
2answers
116 views

Shortcode won't execute

I've created a shortcode using my limited knowledge, google, and stackexchange to do so. But when I load the page, it loads above the page contents and appears as html text. (shortocode text) ...
0
votes
1answer
40 views

Dynamically Generate Functions and Hooks

I'm trying to find if it's possible to dynamically generate functions and hooks. All functions do the same thing, and all hooks are essentially the same. Here's an example of a hook/function combo: ...
0
votes
1answer
28 views

Redirect loop upon installation of my plugin

I have created a plugin that uses a shortcode [MyCreditStatus] to display a form (multi-page form). This plugin uses an API that I also made. When I try to install the plugin, there are times that ...
0
votes
0answers
31 views

Dynamic Post Type Variable echo as string?

Working on a Wordpress Theme. I'm trying to make dynamic post-type names. My code is throwing error but I feel like I'm close... what am I missing? my variables are correct, but the coding within the ...
-1
votes
1answer
30 views

Can't find text source file in WP theme [closed]

The site is http://www.rimongod.ee I'm having trouble with locating the file that holds the text "REDESIGN YOURSELF" that sits under the header image. There's nothing in index.php, header.php or one ...
0
votes
1answer
161 views

wpdb::prepare was called incorrectly

I have this code to remove orphaned posts after deleting custom post type. It works, but this code... global $wpdb; $wpdb->query( $wpdb->prepare( "DELETE a,b,c FROM wp_posts a ...
1
vote
0answers
37 views

conditional logic for front-end custom field edits

I'm just starting to learn php/js and would like some recommendations on the best way to setup my logic: Goal- Display the value in a custom metafield in the custom post type. If the user is the ...
0
votes
0answers
66 views

Include Wordpress Page in TWIG Template File

A programmer recently converted my Wordpress site to the TWIG engine and I am having a great deal of difficulty trying to include the contents of a page in the template. Below is my TWIG file for a ...
0
votes
1answer
54 views

How to sent a email outside Wordpress?

I am setting up a paid membership page on WordPress. It uses a form to get credit card information and an email address, then runs the card and on success sets up a new user. I can run the card, and ...
0
votes
1answer
48 views

How can I use wp_insert_comment to write a comment when a post is edited?

This would mean that when post A was edited by User1, a new comment would appear under post A that reads 'edited by User1', so that the post edit history can easily be seen. A link to the post ...
0
votes
0answers
313 views

fatal error call to undefined function get_header in index.php on line 1‏

I'm really new to WordPress and just started learning watching video tutorials. Whenever i try to load the index.php file from my themes folder it gives a Fatal error: call to undefined function ...
0
votes
1answer
49 views

Posting code inside the post instead of in the template file using shortcode

I am using two plugins one of which is Thumbs Rating which have have a shortcode like this for example in order to display the thumbs rating option: The code bellow is to be used in the templates ...
0
votes
1answer
90 views

How to access global variable $menu inside a class function

am puzzling why can't i access the global variable $menu inside a php class function class adminMenus { public function getWPdefaultmenus(){ global $menu; return $menu; } } using ...
0
votes
0answers
19 views

Undefined index notice when using the $args parameter in add_settings_field()

I'm using the Settings API to provide my admin-user with some options for a plugin I'm writing. I have about 30 text fields to output on the plugin options page so I have created a very general ...
0
votes
3answers
72 views

WP_Query fails despite having 1 post

I'm doing a typical custom post type query with args like this: array (size=4) 'post_type' => string 'custom_post_type' (length=15) 'post_status' => string 'publish' (length=7) ...
0
votes
1answer
35 views

Dynamic CSS through PHP issue

I am trying to create a dynamic style.php stylesheet. The most basic function I am testing is a color picker on my theme-options. The color picker works, but my dynamic css file does not. On Chrome I ...
0
votes
1answer
74 views

PHP if have image display image, if else text

I'm a front-end web developer struggling with some theme option support. I am struggling to write a simple function in my header.php which allows me to do the following: "if user uploads an image, ...