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

ndh01 on "Filter for Media Library to load different image size other than medium"

$
0
0

By default, the media library loads the Medium image size defined in Settings> media. I would like to set it to one of my theme post thumbnail sizes. Is there a filter for changing which size is loaded?

Thank you


dmsman on "Search by State/City or Zip With Radius"

$
0
0

We are in the design stage of putting together a database containing houses which we want to be searchable by street address or zip code. Essentially a site visitor will enter city / state OR zip code, then our search results should include all houses within a given radius of that location. We also want to know the distance so that we can sort the list from closest to furthest away.

We would appreciate any recommendations with respect to plug-ins or techniques which will enable us to accomplish this task. Thanks!

Padmarok on "My Website Gets Hacked Often"

$
0
0

Im Running an Entertainment Blog Moviesrok.com and my blog is often attempted to hack. Whenever i try to login to my Wp-admin panel even if the password and username is saved in the browser i have to login again. And when i try to login it shows the message to login after 20 minutes because of the limit login plugin. It happens over and over, what should i do to get rid of this problem. Please help.

Rancca on "Custom authentication issue with wp 4.0"

$
0
0

Hi,

I have implemented a plugin that replaces the built-in authentication with checking authentication from another application I have.

I followed instructions from http://ben.lobaugh.net/blog/7175/wordpress-replace-built-in-user-authentication and basically the code I have is:

add_action( 'init', 'my_auth_init' );

function my_auth_init() {
    add_filter( 'authenticate', 'my_authentication', 10, 3 );
}

function my_authentication( $user, $username, $password ){
    /* Retrieve correct user ID  */
    $user = new WP_User($ID);
    if( $user->ID == 0 ) {
        $user = new WP_Error( 'denied', __("<strong>ERROR</strong>: Not a valid user for this system") );
    }
    return $user;
}

I got it to work with 3.8, so that the user did not see the login screen at all, when logged into the other system. But after upgrading to 4.0 it seems to force showing the login screen.

I've tried debugging this, and it seems to me that the function auth_redirect in wp-includes/pluggable.php sets the reauth parameter true when redirecting to wp-login.php. And wp-login.php gets the user my custom authentication returns in row 766 $user = wp_signon( '', $secure_cookie );. But after that, where I would expect it to redirect back to the page the user requested, it checks both the user and $reauth in row 791 if ( !is_wp_error($user) && !$reauth ) { and since reauth is set to true, it will not redirect, and instead shows the login form.

Am I missing something here? is there some filter I should set to disable the reauth, or to set the cookies before the redirection completely? Or does the user necessarily go to the login page?

JaneJW on "Please Help! Add Publicize code to "Text Widget"....."

$
0
0

I would like to add Publicize code to my "Text Widget" so text widget posts in my sidebar will link to Facebook and LinkedIn. Will that work? Can you help? Thanks, Jane.

swamini on "Unwanted data and scripts on web pages"

$
0
0

Hello All,

Few days ago our site went blank.

Then we restored it with the old copy and was working fine.

When I view the page source of the web page it has unwanted data and unwanted links which we have not included and has unwanted scripts.

Can anyone please tell why is the page showing other data and scripts ?

Is the site compromised ?

What measures should be taken for the same.

Thank you.

Ratethetrainers on "How to make short codes default on every page"

$
0
0

Im using the GamePlan theme by Envato Market.

By the time I finish my site, Im going to have roughly over 10,000 pages. Each of these pages is meant to give a person a star rating (using the multi-star plugin).

Im wondering if there is a way to make it default so that every page when created automatically comes with the multi-star rating plugin (rather than me having to go into every page and adding the short code)? Please let me know, thanks!

edow on "How to show nearby locations with latitude and longitude"

$
0
0

Hi,

My website has multiple (custom) posts types. Right now they're activities, accommodations and restaurants but in the future there will be more. Every post has a custom field with the latitude/longitude. I also have a custom field with the full address.

When I'm for example on a activity page I would like to show 5 nearby accommodations and 5 nearby restaurants within 10 kilometers from the location of the activity. And vice versa.

Is this possible and if so, how should I do this? I would like to do this without a plugin if possible. Hopefully someone can get me started with this.


Waishon on "Own Permalinks"

$
0
0

Hello :)

I want to make a custom Permalink for my Plugin and show custom content there.
?read=article -> /read/article

Or does anyone know how to make a page, where I put the content in dynamically and change the title of this page?

How can I do that?
Maybe some tips?!

Sorry for bad English :)

lilts520 on "creating an external link field to images in media library"

$
0
0

Hello,

I am new to php. How can I add a custom field within the media library which would allow me to assign an external url to images? I would then want to tell wordpress to get that link within the php.

Is that possible?

Thanks!
Lily

joehark on "how to copy a theme from another site?"

$
0
0

I have found a WP web site with a twentyeleven theme that would be a good starting place for the extensive customizing I will need to do.

Is there a tool that will download that theme without FTP or cPanel access to the server?

Arioman on "Display image or text only in shortcode ( only for a few post)"

$
0
0

hi , after i unsuccessful in put video shortcode to my short post , i decide to put a preview image of my video as image in short post and then show video player ( put shortcode) in full post

now i need a way to hide the preview image after user see full post

i need this only for a few post and not all of them

s there any plugin or code that can help me ??

suzannaabdul on "Site hacked by Burak Aydin"

$
0
0

Hi,

I believed my site was hacked by this guy by the name of Burak Aydin. I logged in to my site today and noticed that my theme has been changed without my permission. This guys have free themes here at wordpress.

Here's the theme that has been installed without my permission:
https://wordpress.org/themes/newsmag

And here's the author's wordpress profile:
https://profiles.wordpress.org/burakkaptan/

I hope that mods here can take a look into this matter. And Burak Aydin, if you are reading this, you are welcome to post in your defence.

eldimentio on "Tips on how to add push notification support on post published"

$
0
0

I have my WordPress installed on DreamHost and I want to add the code needed to send a push notification to the Google servers for my Android app (this just requires curl to POST the info the Google server whenever the events happen right?)

I looked for plugins that helped to do this but they all seem to require a third party registration which will probably either advertise or require fees to do it so I decided to do it myself. While I know some PHP I'm not very familiar with the wordpress code base so can someone give me a couple pointers as to which files I could insert the code for a push notification happening when a new post is made?

Thanks!

mikeyhoward1977 on "Admin Dashboard Widgets"

$
0
0

Hi,

Odd question perhaps but I have been playing with this for hours and can;t for the life of me figure it out!!!

So... I have my dashboard widget all running fine. The widget is split into 2 - the top half shows info relating directly to my plugin and the bottom half shows an rss feed of my latest news articles - all this is fine.

All I want to do is add the full width line between the top and bottom halves of the widget and also make the bottom half grey in colour.
Can anyone tell me how to do this? An example of the line is on the Wordpress News dashboard widget - under the summary text there are 3 more rss titles which are split from the summary by the line.

Thanks and I apologise in advance if I am missing something terribly simple here!


Adrian Toll on "apply_filters the_content not triggering oembed even in the loop"

$
0
0

I've been trying to get a custom wysiwyg field to output as it normally would when using the_content(). To this end I've been passing the contents of the custom field through apply_filters using the_content filter. However, all this is doing is parsing shortcodes without triggering oembed magic for YouTube URLs.

I've read quite a few blog posts that suggest it needs a post ID (i.e. it needs to be in the loop) leading to solutions like this - http://wordpress.org/support/topic/oembed-filter.

However, my code *is* in the loop as you can see from the_content() being used at the top, which outputs as expected and outputs the correct embed code, so I'm scratching my head about why it's not picking up the YouTube URLs and using oembed.

The other post I've read is here - http://dancameron.org/code/wp_embed-oembed-filter-the_content-post_content/ - which talks about caching, but I'm not quite sure what that refers to (I've had a look at the WP_Embed class, and can't figure it out from there).

Does anyone have any ideas why this wouldn't be picked up? My code is below, which uses slt_cf_field_value() from Developers Custom Fields (http://wordpress.org/plugins/developers-custom-fields/) to retrieve the custom field values:

the_content();

if (slt_cf_field_value('tab_title_1') != '') {

    echo '<div id="tab-container" class="tab-container">';

        echo '<ul class="etabs">';

        for ($i=1;$i<6;$i++) { if (slt_cf_field_value('tab_title_'.$i) !== '') {

            echo '<li class="tab"><a href="#tabs'. $i .'">'. slt_cf_field_value('tab_title_'.$i) .'</a></li>';

        }}

        echo '</ul>';

        for ($i=1;$i<6;$i++) { if (slt_cf_field_value('tab_title_'.$i) !== '') {

            $tabContent = apply_filters('the_content', slt_cf_field_value('tab_content_'.$i));

            echo '<div class="tab-content" id="tabs'. $i .'">'. $tabContent .'</div>';

        }}

    echo '</div>';

}

lizbeck001 on "Then and Now Gallery - Can I add this to my WP site?"

$
0
0

Hi WordPress community,

I found a pretty cool photo gallery that unfortunately doesn't have a WP plugin version (https://github.com/ryanpitts/then-and-now-gallery).

What is the easiest way to use this Gallery on a WP site? Just add the files to a folder within /plugins and add images via the FTP and add the text from the index.html file to the index file of the theme I'm working in?

Alternately, does anyone know of a WP galley that functions like the Then and Now Gallery? I looked around and couldn't find any, but many I'm not using the correct key words.

Thank you for your help!
- Liz

Samad on "I need to add more user info to get_currentuserinfo()"

$
0
0

I'm working on a new custom membership plugin. How can I redefine get_currentuserinfo() function or create a new filter on it so it pulls more user membership data such as current user plan etc..
What I need is a generic example.

Thanks

svobodasite on "Display Console menu in Frontend"

$
0
0

Hello!
For one of the my projects there was the need for close integration between the dashboard and the front end of the site - display left console menu on the front end. How to do it?

P.S. Sorry for bad English.

bxwebber on "Stop playlist audio player automatically?"

$
0
0

Hi!

I've created audio playlists using WP's core mediaelement player. When playing selections in a list, at the end of the list the player returns automatically to the first selection and starts all over again.
Is there a hack to stop playing automatically at the end of a play list?

Viewing all 8245 articles
Browse latest View live




Latest Images