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
1answer
248 views

How to display custom post type only on a certain page?

I have created a custom post type called 'project'. But how do I get the custom post types to display only on my main template? It's a one page website and I don't want it to direct the visitor to a ...
0
votes
1answer
87 views

MySQL database migration to WordPress

I have a MySQL database established for a web application I have been working on in a non WordPress database. This database has many tables with pre-populated rows for foreign keys etc. which took a ...
0
votes
2answers
36 views

Dark Bar at the top of wordpress page can't be seen?

I am new to wordpress and created a website as shown in the picture bellow. My webpage used to have a black bar at the top, which allowed me to insert "New Posts". (area shown in red circle). But this ...
0
votes
1answer
48 views

conditional: if is page, and all subpages

What I'm currently trying to achieve is displaying certain menus on certain pages using one template and conditional statements, like so: if (is_page('donate')){ wp_nav_menu(array( 'menu' ...
0
votes
1answer
712 views

Trouble Installing Wordpress Get PHP Not Running Answer

I have seen this topic discussed several places on the internet, both in the Wordpress official forums and on individuals' blogs. Despite having worked through some of the suggestions, I am still ...
0
votes
1answer
250 views

wp nav menu: show submenu below li item

I'm trying to figure out if it's possible to show the submenu's outside of the relevant li tag. For example, this php: wp_nav_menu(array( 'menu' => 'side', 'container' => false, ...
0
votes
1answer
974 views

Query multiple custom post types in single loop

I'm aware there are several other posts that cover similar ground to what I'm about to ask. I have three custom post types running, in addition to 'posts'. I want to run a loop that pulls all posts ...
0
votes
1answer
5k views

wp nav menu: add attributes to menu items [duplicate]

I'm trying to figure out if it's possible to attach an attribute to a wp nav menu item. To demonstrate, this php: <?php wp_nav_menu(array( 'menu' => 'main', 'container' => ...
0
votes
1answer
280 views

How can I exclude a dynamic URL to show a popup created using 'Wordpress Popup' plugin

That might be a long shot, but I though I should give it a chance. I am using WordPress Popup in order to show a popup when a user lands on specific pages on the website. You create a popup and you ...
0
votes
0answers
86 views

How to delete in the pages the pre tag added automatically by Wordpress

i have been looking around but there is not a specific answer to my issue. I have set up a slideshow by Wordpress, then i paste the short code in the page where i want to display. The slideshow is ...
0
votes
1answer
110 views

Display selected parts from selected pages on the frontpage?

I'm build a site for my company and want to display four (of my choise) of our special deals on our frontpage. A special deal is a page. I want to grab: Featured Image Page Title Price (taking from ...
2
votes
1answer
2k views

Why Better WP security plugin returns 418 I'm a Teapot “error”?

I am working on the Wordpress website and all of a sudden after deploying it on the server, I started seeing a problem where some of the pages on my website return 418 I'm a Teapot as Response status ...
0
votes
1answer
267 views

Update Custom Field on Imported Post Creation

So I've created a function that updates several custom fields in a post when the post is created. The idea is to sanitize this information so that I can easily use it for other purposes. The ...
3
votes
1answer
496 views

Why Can't PHPUnit UnitTest My Wordpress Website

I have been researching this issue for days and although many people ask this question I never found a clear and concise answer. I am running: PHP Unit: Version 3.7.21 WordPress: Version 3.5.1 OS: ...
0
votes
1answer
70 views

How to check “From Email” via WordPress before an email is sent

Is it possible to check an email from email via WordPress before an email is sent? I'm working on a phpmailer plugin to send WordPress email via Amazon SES (which requires all emails to be verified). ...
0
votes
2answers
983 views

How to exclude specific category from the get_the_category(); array

In my loop I've added: <?php $categories = get_the_category(); $separator = ' '; $output = ''; if($categories){ foreach($categories as $category) { $output .= '<span ...
0
votes
3answers
194 views

Why I can download any file except PHP files from a URL but I can download any from another site?

all, I've been struggling with this for the past two days, I just can't find the answer - sorry if I post this in the wrong site but this is the best option I could think of. I have some problems ...
0
votes
1answer
53 views

Shrinktheweb plugin problem

I've added the following code to a page: <?php echo do_shortcode("[thumb]'".bp_profile_field_data('field=2')."'[/thumb]"); ?> This pulls a url from my database, and it should, according to my ...
0
votes
2answers
158 views

Get used terms by an author as array of strings

I am using list_author_used_terms function below to get the terms used by a specific author (terms of a custom taxonomy 'wossom' for a custom post type 'aya-bi-aya'). function ...
0
votes
1answer
271 views

Update Wordpress Custom Field with AJAX on cached page

I'm new to ajax am trying to create a simple hit counter that updates a custom field in Wordpress after the page loads. The page is cached, so any attempts to use PHP alone will not work. I'd like ...
0
votes
2answers
8k views

how to get page id of a page using page slug

Im pretty new to wordpress and I was wondering if I could get a page id with it's slug. Is it possible please let me know.
0
votes
1answer
62 views

Should I use Wordpress to skin a database website?

I am going to start programming a website which allows users to post adverts for aircraft for sale. (Think autotrader for planes). It will be free to use. There are a few websites that do this already ...
0
votes
2answers
322 views

Fatal Errors on pluggable.php

I was looking to change the "Wordpress" name in all of my sent mail. In the past I have customized my Wordpress backend to display my desired email. But I have downloaded a new plugin that has altered ...
0
votes
1answer
299 views

Fatal Error wp-settings.php on line 119

Receiving this error message after a post update: Warning: require(/home/thomwhite/wparch.com/wp-includes/post-template.php) [function.require]: failed to open stream: Permission denied in ...
1
vote
1answer
61 views

Common abstract class for plugins

I have a few plugins and intend to move them to a very common base with an abstract class. The issue is that even if I apply solutions in order to avoid class duplications ( like EarnestoDev's answer ...
1
vote
1answer
3k views

Get a list of galleries from an album in NextGEN Gallery [closed]

I want to get a list of galleries of a certain album. Than I would create a link to this galleries. How do I get the list of galleries in PHP? I saw that there is some code like global $nggdb; ...
0
votes
1answer
156 views

php include not working in custom page

The Problem I have a db.php file which contains mysql login details. I want it in a separate file like this so it can be linked in several different pages for easier tracing later. This all works ...
0
votes
2answers
73 views

random reason on refresh

I am editing the sidebar widgets and have added one for users who are not logged in or registered. the widget requests that users register or login and I am wanting to add a random reason (quote) as ...
0
votes
1answer
413 views

How do I unserialize this?

I don't know the most about WordPress, but I see some serialized data in the DB that a plugin creates. The plugin works just fine, so I guess it unserializes it just fine too. When I try to ...
0
votes
0answers
178 views

Save Changes function after table is sorted using jquery

I have a simple table, and the jquery works great for sorting. The fields drags an drops perfectly, and updates then and their. Also of course the data in the fields are saved in a array. The data in ...
0
votes
1answer
64 views

Target all images that are not the first attachment

I'm querying image attachments on a template I'm writing. For a layout purpose, I'd like to apply a css class to all the images that are not the first. Here is the code I'm currently working on, I'm ...
0
votes
2answers
2k views

Create placeholder text for wordpress search box [closed]

I need to create a search box in my default searchform.php file that has similar behaviour as the default ability in HTML5 with the "placeholder" attribute. This is what I have in my searchform.php ...
0
votes
1answer
47 views

Menu's breaking, now showing all page links on site

There's something quite odd happening on a site I'm working on I can't figure out why at all. I have a custom post type set up for news and categories so the user can select what type of news it is ...
0
votes
1answer
377 views

How to style this wp_list_pages markup

I'm wanting to custom style the output of this wp_list_pages $children echo, here is the code: <?php if($post->post_parent) $children = ...
0
votes
1answer
516 views

dynamically filter by category via sub-menu

I'm trying to figure out if it's possible to dynamically filter my custom post types by category via a sub-menu I have set up. So I've set up a custom post type: news and enables categories that I ...
0
votes
1answer
23 views

How to tell if a user has gone in and created a menu

By default if a user has not created say a footer or a top level menu then WordPress, in the case of the footer, will use default content like pages and so on to "create" a menu. I don't want this to ...
0
votes
1answer
1k views

Theme my Login plugin, how to update fields

I'm using the Theme my Login plugin for a client project and I'm having trouble updating profile fields once a user has been registered; I followed the instructions here but they didn't seem to have ...
0
votes
1answer
178 views

using images in next/previous_post_link [closed]

In my blog's pagination section, I've used <?php previous_post_link(); ?> and <?php next_post_link(); ?> to generate the newer and older posts links. Within that action, though, I've ...
0
votes
2answers
277 views

how to remove sidebar from particular one page

I am writing this code in page.php for removing the sidebar in one page <?php if (is_page('x')) : ?> <?php else : ?> <?php get_sidebar(); ?> <?php endif; ?> ... where "x" is ...
0
votes
1answer
81 views

How do I custom code the start page?

I'm pretty experienced in development in general, and also did some PHP coding to generate hmtl pages. I've also got a running WordPress blog with a number of posts. As a start, I want to "generate" ...
0
votes
1answer
75 views

How to call custom function outside from the admin page?

I've created a function but i have some problems with it... echo get_option( 'my_function', 'custom_logo' ); I try to use this in my code but it returns me an array not a string. When i use echo ...
0
votes
0answers
150 views

Using Select HTML in Bootstrap Popovers

I want to be be able to utilize a select few HTML tags in a Bootstrap popover. I know that I could include the option HTML = true in the settings, but this would leave me exposed to an XSS attack ...
0
votes
0answers
100 views

Postal address auto-complete on profile page

Is it possible to have an address auto-complete function (Where you enter your house number and post code and it automatically populates the address fields for you) within the Wordpress user profile ...
0
votes
2answers
32 views

How to modify the default feed via a function

I am trying to add a functionality to the default wordpress feed. The problem is i managed to do this modifying the rss feed php file. The problem number two that i have in mind is when wp gets an ...
1
vote
1answer
65 views

wp_kses and magic quotes

n00b question - in the wp_kses codex page it says "You have to remove any slashes from PHP's magic quotes before you call this function." I am new(ish) to PHP and I wiki'd Magic Quotes and it was ...
0
votes
2answers
922 views

Using file_exists to check file in Uploads

Context: For a site's images used in a particular section, each post relies on a base name put into meta data, which then is used with automatic extensions to generate large images, gallery thumbnail ...
0
votes
0answers
73 views

How to force wordpress custom slider text to be static?

I have created my own customized slider plugin for wordpress and it is well created with all the features. But now i want to do that 'title' and 'description' displaying with each image should remain ...
0
votes
1answer
116 views

How to callback custom field text

I have a plugin where the user can click a button to feature a post. I added a text field but i want the text field to call back whatever is posted in it Here is how it looks now ...
1
vote
1answer
261 views

Showing user ID on user main page from screen options

On the user main page in the screen options, you have some choices for displaying user information e.g.. e-mail, role, posts etc.. Is there a way to be able to display the user's unique ID?
2
votes
2answers
105 views

Unable to set right time in admin and frontend template

When I run a simple php file called test.php (placed in the root of the wp installation) that contains something like that: <?php echo date('H:i:s'); ?> The result is right: 15:30:00 and the ...