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

learn more… | top users | synonyms (1)

1
vote
2answers
365 views

How do I programmatically add items of content to a custom post type?

I have a custom post type to which I'd like to programmatically import data. I have followed these instructions and these, and I can easily do it for WP typical pages and posts. However, my custom ...
-1
votes
2answers
98 views

Adding header logo instead of text

I want to add Header logo instead of the text "physics for All " in the following site. I think , i have to add my logo to my site then , i will have to insert the image link to the header.php ...
0
votes
1answer
52 views

How to change home or site url using action hooks or filter?

I want to change url dynamically, so is there any way to change url? I know other methods like from admin, directly from database or wp-config. but i want to change it from either hooks or filter. ...
1
vote
3answers
293 views

How to show a 'correct' message after submit a form?

I'm building a template page for submit a profile changes. I would like to show a 'correct' message in green(example) for the user knows. Here my template code: <?php global $avia_config; /** * ...
1
vote
0answers
50 views

How do I get around “Sorry, this file type is not permitted for security reasons”?

I was wondering how I could allow .tiff files to be uploaded in my wordpress site. I get the message "Sorry this file type is not permitted for security reasons". This question has been asked in ...
0
votes
2answers
39 views

How do I do so that people can register on my wordpress site?

I've been given a task by my teacher to do a "social network" for a game. To begin with, I want to make a custom theme where people at first have the opportunity to register and login. As I have ...
1
vote
1answer
29 views

Proper syntax or method for keeping url in modified isotope / category links

I'm setting up a project gallery using isotope jquery plugin for layout and filterability. I've seen examples of how to add a list of category links and modify them to filter on click, but... I want ...
0
votes
1answer
294 views

How to check if woocommerce is activated in theme

I'm creating a theme with woocommerce which has the following: <ul> <li> <?php if ( is_user_logged_in() ) { ?> <a href="<?php echo ...
0
votes
0answers
46 views

A-Z Index Taxonomy

Hi to all I just got working the code below to display an alphabetical pagination on index. //Register the AZ Index shortcode [azindex] $azindex = ''; add_shortcode('azindex','azindex_get_filter'); ...
0
votes
0answers
33 views

Need help with custom PHP plugin

I'm trying to write a small plugin to use for testing login credentials to use with some games I'm making. But I keep running into issues with the script I can't figure out. The issue I'm having is ...
0
votes
1answer
141 views

Accessing an API with jQuery and AJAX

As a proof of concept I'm trying to access an API using jQuery and AJAX and posting the results to a page. After following some online tutorials and doing my best to put it all together, I have the ...
0
votes
0answers
41 views

Auto order posts of custom post type by title

I have a custom post type which has more than 50 posts. I want to reorder them alphabetically so that each time I post anything the system automatically reorders. Please don't suggest post order ...
0
votes
0answers
57 views

Rewrite url for custom post type not working

I have a Custom Post Type and i want to rewrite the URL. nothing is working though. This is the adress i have now /?portfolio=adidas. When I rewrite the numerous ways i tried i always get this ...
0
votes
0answers
27 views

Which core file(s) handle $_POST and $_REQUEST?

I have a wordpress site with a subdirectory which should be excluded from the wordpress environment. I have tried to exclude it via .htaccess, and I have tried to make sure my form element names don't ...
0
votes
0answers
29 views

How to add multi uploader to wordpress plugin?

I have a plugin where i need it two handle multi uploading forms to capture some images. but when i program the first one everything goes well and i can simply upload image and show a preview of that ...
0
votes
2answers
132 views

How to use my style.css file outside of wordpress subdomain?

I am building a wordpress theme from scratch on a subdomain and I want to use the same CSS files across my entire site. My problem is linking my wordpress PHP files (which are on the subdomain) to my ...
0
votes
2answers
209 views

Filter second dropdown (tax) based on first dropdown (cpt)

I've been googling and attempting this for over a week now with no success. I have a few custom post types (books, films, music etc), and a custom taxonomy (location). On my frontpage, I have two ...
1
vote
0answers
27 views

Problems accesing my site [closed]

I was building a new site with WP, but when I checked it with various servers on http://www.host-tracker.com/InstantCheck, most of the request are returning with a 503 error. In addition my memory ...
0
votes
2answers
67 views

I restricted wordpress by logged users. It's possible exclude a page?

Here is my code for restrict my wordpress site: function restrict_access_if_logged_out(){ if (!is_user_logged_in() && !is_home()){ $redirect = home_url() . '/wp-login.php?redirect_to=' ...
0
votes
0answers
53 views

Meta-Box to add multiple items one at a time and on publish save all

My example custom content type is for recipes. There will be a meta-box for ingredients. In this meta-box there will be three attributes and a "add" button. Name Measurements Notes Add Button My ...
0
votes
0answers
36 views

How can I embed a .php file inside of a widget?

I have a currency exchange that I'm trying to put in the sidebar of my Wordpress site. The currency exchange is a simple php file that I'm trying to 'embed' as a widget. I created a simple plugin, ...
1
vote
0answers
247 views

Should I use spl_autoload_register() in my plugin?

When I use spl_autoload_register in my plugin, I get: Fatal error: Uncaught exception 'LogicException' with message 'Class wp_atom_server could not be loaded' ...
1
vote
1answer
91 views

Edit Image/Image Details - Replace button missing

I have a strange problem. I am dynamically populating content into Wordpress' tinyMCE editor. Part of this content is a placeholder image, that the user can then replace. The issue is when I click the ...
0
votes
1answer
72 views

Values inside a custom field to determine which category posts to display

I am facing a little problem whilst trying to display posts, from certain categories, on the front end. I've created a custom field whose key is 'related_categories' and I've different categories with ...
0
votes
0answers
49 views

Use proxy to bypass JSON restricion

I'm trying to pull content from an API that does not allow JSONP using jQuery and AJAX. Obvisouly I'm running into cross domain problems. The only work around for this seems to be using a proxy on my ...
0
votes
0answers
24 views

Check role in database

I'm developing a script outside of Wordpress that needs to work with the Wordpress database and our website. I just need to check if the role of a user is our custom role (already defined) of ...
0
votes
1answer
32 views

I want my wordpress loop to only display posts of the standard format

I currently have the following php code for the content loop on my homepage. <?php if ( have_posts() ) : // Start the Loop. while ( have_posts() ) : the_post(); ...
0
votes
1answer
37 views

Adding instant search to wordpress page

I'm new to the site and to web development in general. I have a domain name, a hosting site, and wordpress installed. That took me most of a day. Now I'm trying to add this functionality to my site ...
0
votes
0answers
18 views

Removing WP-Login inputs

I'm building a passive captcha system for my WP sites, and I'm attempting to remove the inputs (username, password, submit) from my standard WP-Login page via php hooks; they'll be replaced via jQuery ...
0
votes
1answer
127 views

Can't update multiple rows with $wpdb query

it seems that I cannot update multiple rows to change the post_type of posts having a specific tag. I follow different method, even if it seems the good one is this one : global $wpdb; $result = ...
0
votes
1answer
45 views

2 wordpress site same database

I have twoo websites on worpdress platform: http://fian.ro/ http://nuovafattoria.ro/ On the server there are 2 different folders with same files, same config but one of them has: ...
0
votes
0answers
19 views

Best way to define a database with product codes and back-end support?

First let me explain what my wanted situation is: I have a WordPress site where I want the Admin to have access to about 10.000 "product keys". These codes will be inserted in a database of some sort ...
0
votes
1answer
320 views

Apple push notification doesn't work

I wrote a plugin which fires an apple push notification to IOS devices. When I fire it manually via the root directory, it works perfectly. The catch, when I move it to plugin folder and run it as a ...
1
vote
0answers
97 views

Display image from an external rss feed on wordpress without plugins

I am trying to add an external RSS Feed to my wordpress theme. Displaying the feed content and title was a success. But I don't see any option to display the image from the external feed. I tried ...
6
votes
1answer
176 views

Inject post (from specific category) between posts in Loop

I would like to add a post (from specific category) between posts in the WordPress Loop (such as 'Sponsors'). Example: P P P S P P S P P S P P How can I achieve this? I am a beginner with coding, so ...
0
votes
1answer
53 views

Check in which custom taxonomy belongs and change the style

I want to change the css style of a single.php which belongs to a custom taxonomy, based on the category. I achieved to do it in taxonomy.php for some of the categories but i can't make it to work on ...
0
votes
1answer
55 views

Create custom permalinks to show Custom Post Type's relationship?

I'm creating a WordPress site that has 3 custom post types registered: course, chapter, and lesson. All of these post types are inter-connected and share a relationship using custom fields. For ...
0
votes
0answers
35 views

Programmatically choose a background-color to go with an image?

Is there a function, either in PHP or Wordpress itself, or in a plugin, that will choose a good css background-color to go with a given background-image? For example, if someone chose a very large ...
0
votes
1answer
95 views

Create special button on WP Tiny MCE Posts Editor for Shortcodes

I am trying to create a special button on the Tiny MCE editor on the Post Editor of Wordpress. I want to create a button for my created shortcode tooltips. Check out my desired output: ...
0
votes
1answer
17 views

Why when I create a new post I found 2 record related to this post into the posts database table?

I am very new in WordPress development and I have a doubt about the WP database table named posts I have observe that when I create a new post (into the WP administration panel) are created 2 record ...
0
votes
0answers
8 views

How remove Wordpress Impression from my website [duplicate]

I am developing one wordpress theme for client. I completed the theme. But he is asking about remove the wordpress theme impression. Here impression means when i try to see view page source i am able ...
0
votes
1answer
233 views

Why WordPress architecture is not pure object oriented and it don't use MVC pattern? [closed]

I am pretty new in WordPress and PHP development (I came from Java and C#) and I am a bit astonished about how WP is structured. Coming from Java and C# I'm used to work on totally object oriented ...
0
votes
2answers
86 views

If or/and statement advanced custom fields [closed]

I'm really unexperienced when it comes to conditonal statements with php and unfortunately the documentation of Advanced Custom Fields isn't covering this topic as fair as I know. But anyway, what I'm ...
0
votes
0answers
26 views

Custom Search not working

Can any Wordpress Guru figure out why my custom search form just reloads the page when submitted? I'm trying to create a custom search that uses two dropdowns only (no text input). The first ...
1
vote
1answer
51 views

How to show only a certain part of the entry title?

Working on a project that I'm running into a snag about... I have a page title using the_title() ... that has a location in the title such as this: "Adventure Dental - Colorado Springs, ...
0
votes
4answers
53 views

How to obtain the current website URL in my theme?

I am working on a custom theme and I have the following doubt about how to correctly insert the link to some section of my website into the theme. If you open this link you can understand what I need ...
0
votes
2answers
46 views

Syntax error when I try to insert my loop into an unordered list? [closed]

I am very new in PHP and WordPress development and I have the following problem trying to insert some HTML code into the posts loop. I tried something like it: <?php if (have_posts()) : ...
1
vote
1answer
51 views

How to Reference/Echo Variable from Another PHP Function

I have successfully set up a PHP function for my blog posts to create a shortcode to automatically display/style an iFrame tag for a YouTube video, as well as pull in the duration and view count ...
0
votes
1answer
38 views

Plugin Hook: Get posts

I am building a WP plugin. It shows several featured post images with titles atop. It will have a spot on the admin bar to tell it what the featured posts are. What hook do I use to get the post's ...
0
votes
2answers
74 views

Differences when using the the_time and the_date functions

I have some doubts about how work the WordPress the_date() functions definied into general-template.php In a page I show the posts archive using this code snippet into a loop: <article ...