Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all 8245 articles
Browse latest View live

DLHershy on "Google Analytics Click to Call Tracking Code Not Working"

0
0

I have been working with Google Analytics to get the code for tracking click to call conversions. The code, according to Google Analytics Support is correct. They state that there is something in the code on this site that is preventing the tracking code from working.

Any suggestions on what to check would be greatly appreciated. Below is the code that has been used for this -

<a*href=”tel:8665701785"onclick=”_gaq.push(['_trackEvent','Click-to-Call','Nav','866-570-1785']);”>866-570-1785</a*>
(*) added to enable code to be shown here...

This code was placed with each of the four numbers on the site with a unique tracking event for each number.


nolaandy on "Plugin that Generates Unique Coupons Daily"

0
0

Anyone know of a plugin that will generate a unique coupon automatically everyday?

I have installed WPS Coupons as well as Coupon Creator.

Neither plugin has the ability to create a unique coupon automatically every day.

I need to offer people a coupon when they complete a quiz but the coupon has to be good for that day only.

I don't want to create a coupon for each day of the year as that would be cumbersome.

Please help me with some direction!

matthillcomer on "Custom field meta box on post edit screen"

0
0

Hello all... My site has a pre-existing custom field, "Subhed." We use it to display secondary headlines and we use it in the default Custom Fields box on the post editing screen. I can I create a custom meta box only for the existing "Subhed" field, similar to the standard Excerpt box that appears below the post text are? I have looked at documentation to create custom meta boxes and I'm completely lost. Thanks.

truheart on "FIltering posts based on custom taxonomies and categories"

0
0

Hey guys,

I'm trying to design a sidebar which lists links to the archive pages for posts based on specific categories and my custom taxonomy labeled "Topics". I have 4 Categories (Teachings, Posts, Media, Books) and multiple hierarchical "Topics" (i.e. Theology, Philosophy, History, etc.).

What is making this difficult is that each Topic belongs to multiple Categories. For example, I might have a post that reviews a historical biography (Category=Book, Topic=History), while at the same time have a post that contains a video discussing historical events (Category=Media, Topic=History). Using this example, what I am trying to do is make sure that for every time someone is on post or page that belongs to the Media Category, the sidebar is only listing taxonomies which will link to the videos and not the books. I hope that makes sense. If not here is an example of what I am trying to do:

(Sidebar when someone is on a media page)
Theology            (Cat=Media, Topic=Theology)
  -God              (Cat=Media, Topic=Theology->God)
  -Religions        (Cat=Media, Topic=Theology->Religions)
Philosophy          (Cat=Media, Topic=Philosophy)
  -Metaphysics      (Cat=Media, Topic=Philosophy->Metaphysics)
  -Ethics           (Cat=Media, Topic=Philosophy->Ethics)
etc...

Raja on "Embed pdf automatically after upload via media"

0
0

I want to upload pdf files via media->add new which should be automatically embedded to a unique page for displaying it. So that I can just give that page link to my client to view the uploaded pdf.

Please help me.

olyma on "Turning Off Open Sans for the 3.8 Dashboard"

0
0

I’m looking for a way to turn off the Open Sans font in the admin. I’m already using the code below to force the admin area to use a different font:

function betterfonts1() {
?>
<style type="text/css">
body {font-family: Times New Roman,Times;}
</style>
<?php
}
add_action( 'admin_head', 'betterfonts1' );

This works really well, but the Open Sans is still being called in the header. It looks like this in the header:

<link rel='stylesheet' id='open-sans-css' href='//fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext&ver=3.8' type='text/css' media='all' />

For efficiency I’d like to have the call be turned off completely. I’ve tried the following bit of code:

function removeopensans() {
	wp_deregister_style( 'open-sans' );
}
add_action( 'admin_enqueue_scripts', 'removeopensans' );

And this works, but it completely removes the stylesheet so there is zero styling for all of the admin. I’ve also fiddled with the core file script-loader.php by commenting out line 634:

// $open_sans_font_url = "//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=$subsets";

Commenting out this bit of the core file does the trick. It turns off the open sans font call in the header but keeps the general admin styling. Is there a way to turn off the open sans font in the admin without fiddling with core files?

wdlyons on "Correct metgod to include wp-load.php"

0
0

Hi,

I submitted the plugon and received the following email back from Wordpress:

Including wp-config.php, wp-blog-header.php, wp-load.php, or pretty much any other WordPress core file that you have to call directly via an include is not a good idea and we cannot approve a plugin that does so unless it has a very good reason to load the file(s). It is prone to failure since not all WordPress installs have the exact same file structure.

Usually plugins will include wp-config.php or wp-load.php in order to gain access to core WordPress functions, but there are much better ways to do this.

It's best if you tie your processing functions (the ones that need but don't have access to core functions) into an action hook, such as "init" or "admin_init".

Please consult the Plugins API reference for more information: http://codex.wordpress.org/Plugin_API

If you're trying to use AJAX, please read this: http://codex.wordpress.org/AJAX_in_Plugins

When you've corrected your code, reply to this email with the updated code attached, or provide a link to the new code.

However, I do not use include and the only file I call is wp-load.php

The code I use to do this is:

$parse_uri = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] );
require_once( $parse_uri[0] . 'wp-load.php' );

Can anyone point me in the right direction to what I need to be using if this is not accepted.

I call that file because withput it I get a

Fatal error: Call to undefined function error

Thanks

Warwick

kuckovic on "$wpdb"

0
0

Hi everyone!

I'm developing a plugin, and I'm almost done.
I have some issues though.

When I add something to my database, it's shown on my admin-dashboard. That part works fine and dandy! But! I want a "Delete" button to each "item"..

This is how i "Call" the items from my DB:

global $wpdb;
$table_name = $wpdb->prefix."comment_reminder";
$cremindsql = $wpdb->get_results("SELECT * FROM $table_name ORDER BY id DESC");

As I said, that part works great!
Now, I want to add a DELETE button - I just can't figure out how I do this. I have this code for now:
$delblog = $wpdb->query("DELETE FROM $table_name WHERE id ='1');

How can I make "WHERE id = '1'" to be automatic?
I mean, I have a button beside each item, not I need, somehow, to put an "id" to each button?

How do I do this? :(

Thanks
Kucko


joint77 on "Change Default Link in native gallery"

0
0

Hi guys

I've a question,

Is possible change default link to attachment in link to media file via code?

I would like link to media as the first option, by default.

Thank you,

:)

hectavex on "Built an OAuth2.0 login system, need a little help"

0
0

Here's the plugin/code:

https://github.com/perrybutler/wp-openlogin

What I am wondering is how I might be able to eliminate the usage of:

require_once( "../../../wp-load.php" );

This "malpractice" can be found in the login-openid.php and login-facebook.php files.

I understand this will prevent my plugin from being placed into the WordPress plugins repository.

The reason for using wp-load.php is because of the way OAuth 2.0 seems to work. During authentication, the browser navigates to the third-party authUrl, then returns to our site on success or failure, and it's at this point (the cross-domain return path) that we need to access the WordPress core again (to register or login the WordPress user), but we no longer have a reference to it since our script is now being called from outside the WordPress environment. Hence the reason for wp-load.php.

If someone could let me know how to tackle this I would greatly appreciate it!

Thanks,
Perry

Cory.Nickerson on "Creating a URL for a function"

0
0

I have a custom function which simply includes another file. But I can't figure out how to make a URL for this function.

admin.php?page=scholarship_view&id=1

The link currently just loads an error page. I need it to load a file in my plugins folder scholarship/scholarship3.php.

anup@xentrictechnologies.in on "wordpress default function is not working in my custom plugin,please help me."

0
0

i am new in plugin development.i am submitting a form in front end,after submitting i am showing a simple hello message.

but during form submission below error are showing:

Fatal error: Call to undefined function get_option() in C:\wamp\www\Anup\dating_world\wp-content\plugins\registration_form\registration_form.php on line 9
please help me
here is my plugin code:

<?php
/*
Plugin Name: Registration Form
Description: WordPress plugin for register user
Author: Anup
Version: 3.5.2
site:http://anupkoldhn.wix.com/anup
*/
$siteurl=get_option('siteurl');

define('REGISTER_FORM_FOLDER',dirname(plugin_basename(__FILE__)));
define('REGISTER_FORM_URL',$siteurl.'/wp-content/plugins/'.REGISTER_FORM_FOLDER);
define('REGISTER_FORM_FILE_PATH',dirname(__FILE__));
define('REGISTER_FORM_DIR_NAME',basename(REGISTER_FORM_FILE_PATH));

	add_action('front_display','front_display');
	add_shortcode('register','front_display');
function front_display()
{
	/*$user_data = array('ID' => '','user_pass' =>'anup123','user_login' => 'anup123','display_name' =>'anup123','first_name' =>'anup324','last_name' =>'baba44','role' =>'subscriber');
       echo "sggg".$user_id = wp_insert_user( $user_data );*/

	   if(isset($_REQUEST['submit']))
	   {
		   echo "hello";
	   }
?>

 	<table>
<form name="form" id="form" method="post" action="http://localhost/Anup/dating_world/wp-content/plugins/registration_form/registration_form.php" >
    <tr><td colspan="2" align="center"><span id="message"></span></td></tr>
    <tr><td>UserName:</td><td><input type="text" name="name" id="name" /></td></tr>
     <tr><td>Password:</td><td><input type="password" name="password" id="password" /></td></tr>
    <tr><td>Email:</td><td><input type="email" name="email" id="email" /></td></tr>
    <tr><td>Gender:</td><td><select id="gender" name="gender">
    							<option value="men">Men</option>
                           		 <option value="woman">Woman</option>
                             </select>
    </td></tr>
    <tr><td colspan="2" align="center"><input type="submit" value="Submit" name="submit" /></td></tr>
    </form>
    </table>

<?php

}
?>

[Please post code or markup between backticks or use the code button. Or better still - use a pastebin. Your posted code may now have been permanently damaged/corrupted by the forum's parser.]

4795209 on "Question About Learning JavaScript"

0
0

Hi! I'm learning JavaScript and wanted to test out some coding on a demo self-hosted site I have. What surprised me was when I entered a few lines of basic JavaScript coding and tried to set the page up to be password protected, the JavaScript seemed to cancel out the password protection aspect. After I deleted the JavaScript and reset the password to something different, it worked again.

I'm a 100% newbie to JavaScript but am very familiar with HTML and WordPress and want to make sure I understand cause and effect.

Can anyone please help me understand what happened and why?

Thanks.

perruci on "My Site was hacked..."

ncj on "Find/replace on pagination using PHP"

0
0

I'm trying to do a find/replace on the pagination links using PHP but am having trouble putting this code into a variable so that I can do a basic str_replace command. Can anyone recommend a way to do this?

This is the code rendering the pagination:
<?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?>


AontachtS on "Multi user calendar"

0
0

Hi,

I'm looking for a calendar that I can use to show a persons free/busy status.

It will be used on a site that has multiple portfolios on it, and so must be able to support multiple profiles whilst only showing the availability of whichever profile the visitor is currently viewing.

Thanks,

Aontacht

dc3writer on "shopping cart"

0
0

I want to list various products and prices on my website and tried several PayPal plug ins. The last one I tried was WP Ultra Simple Shopping Cart Usage v 4.3.8.1. While I can get the shopping cart I can’t seem to be able to get the PayPal logo. I’m new to this and I’m completely lost.
Thanks for any help you send my way.
Henry

selnomeria on "May i use to_ping column of DATABASE?"

0
0

Hi.
I wanted to save some individual post data to each individual to_ping field (in MYSQL database> wp_posts table)
and can i use that field without further problems? Will there appear problems ever(i.e. Is that column automatically cleaned or may smth danger happen?)

Sam on "Hooks for wooCommerce"

0
0

I want to write a hook s for woocommerce_template_single_add_to_cart.
I have already written some other hooks that work nicely mostly for a child theme.
As far as I understand one can write hooks for woo/functions that are in the template directory by duplicating the folder structure.

But this function in woocommerce-template.php located in the template directory. I have tried to hook it and it does not work. I had heard that function in the woocommerce folder are not hook-able.

Nevertheless the documentation (http://docs.woothemes.com/document/hooks/ second hook from top)

says that is his hook-able. So how is this done?

Maraki on "Main RSS Feed - Show only posts from one category"

0
0

I would like to have my main RSS feed to show posts from one category only.

Is there a function that can help me achieve this?

Viewing all 8245 articles
Browse latest View live




Latest Images