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

dannydanny on "Google Webmaster Errors -- Theme Twenty Twelve"

$
0
0

Part 1 (part 2 below)

I'm using the theme Twenty Twelve and I have searched high and low across the Internet for the solution to my problem. I'm getting this error in google webmaster tools:

Error: Missing required field "updated".
Error: Missing required hCard "author".

My site is a site with hundreds of static PAGES, not posts. I do have a blog that goes along with the site, but I don't even have those posts indexed. I only care about the pages.

I have implemented the "entry-date updated" fix I've seen all over the place in the functions.php file (line 375; latest version of Twenty Tweleve; version 1.4). I still am getting the errors for all my static pages.

I have the message that authorship is working for the page.

However, in the "extracted structured data" section, I get the above-mentioned errors for all my site's pages.

As I said, I have authorship working. My google+ account is successfully linked with my site.

So, is there any obvious, simple fix to this problem that I'm missing?

Any help would be appreciated. I know there are multiple posts about this on the Internet and on these forums, but I can't find the fix for my specific problem.

My site: http://truthsaves.org/

Part 2 (a few days later)
I'm still working on the problem. Any assistance would be greatly appreciated. I've solved half of it.

I found this line in the content-page.php file:

<h1 class="entry-title"><?php the_title(); ?></h1>

and I changed it to this:

<h1 class="entry-title updated"><?php the_title(); ?></h1>

I just added the word updated.

Now the updated error that I posted in my original post is gone. Remember this is for the theme "twenty twelve" pages, not posts.

I still have the following error and not even sure it can be fixed! I'm sure it can. But maybe twenty twelve doesn't have any support for author markup in pages. I don't know.

Error: Missing required hCard "author".

Any help? Would love it if someone could help.


digitalcam on "Unauthorized access to my site"

$
0
0

Over the paste 2 weeks my site has been accessed several times and each time the perpetrators disable my plugins, including the WordFence security plugin.

Each time I've had to restore the entire site with a backup.

Today I looked in my apache logs and noticed the time when my site went down someone from from an Asian IP address logged in using wp-login.php.

I had JUST changed the the username and password but apparently they already had my updated changes.

Can someone give me a clue as to how they are doing this?

I'm afraid to leave my site address here. (you can understand why)

c05338 on "How to show sub-menu with main menu"

$
0
0

How is it possible to list sub-menu with parent menus dynamically as a sidebar. I made many researches and nothing working so far.

I'm creating a sidebar menu using twentyfifteen classes.

I need to show

- Main1
- Main2
- Main3

When clicking Main1 it will show all subs:

- Main1
--- Sub1
--- Sub2
- Main2
- Main3

cb95 on "Spam content on load from chrome on iPhone"

$
0
0

My site seems to be comprimised, or at least this one page is where I notice it, compostcrew.com/faq . The issue is only visible when accessing the page via Google Chrome app on an iPhone (tested with iPhone 5 and 6). In every other browser and device (desktop, iPhone 6 safari, htc one, iPad Chrome and Safari, etc) it loads fine.

The added content seems to take place of mobile navigation menu. If you look at the cached google page you can actually see what it looks like there too, which I guess means it's not really isolated to chrome on iphone, not sure how pages are cached exactly.

http://webcache.googleusercontent.com/search?q=cache:csPTNyv_y3kJ:compostcrew.com/faq/+&cd=1&hl=en&ct=clnk&gl=us

Take a look and let me know where I should look, I really do not want to do clean install. It appears to be in a div with class post and is just a bunch of paragraphs.

abooExe on "No notification displayed when ADMIN replied a comment from the back end"

$
0
0

Hello, I am using wordpress v4.1 and when ADMIN click on reply button there is no notification displayed to show that the reply was successfully sent or saved. How can i display a notification to show the ADMIN that his reply was sent.

wannes on "Pagination problem"

$
0
0

First of all I apologize if this is not the correct place to post this question.

I got a site with some funky reacting pagination. I use the pagination like so :

<?php

$big = 999999999; // need an unlikely integer

$totaal = wp_count_posts();

$pagination = paginate_links( array(
	'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
	'format' => '?paged=%#%',
	'current' => $paged,
	'total' => $wp_query->max_num_pages,
	'type'=> 'aray',
) );

print_r($pagination);
	wp_reset_postdata();

?>

This gives me 286 pages, but with 6 item on each page and 879 posts the number ofpages is incorrect. If i leave this on and go to page 7, nothing is displayed. Only the pages up til 6 work as they should. If I switch $wp_query with $home_query ( $home_query = new WP_Query( $args ) ) in 'total', then I only get 6 pages.

So somewhere ( probably in a bit of code that I didn't post ) I tell wordpress to only add functionality to 6 pages or something like that. Does anyone know how to fix this or in what section of all my code the problem could be ? The link to the website is

Thank you in advance.

hojjatmr on "How can set image background in a WordPress Plugin page?"

$
0
0

Hello

How can set image background in a WordPress Plugin page?

for example https://wordpress.org/plugins/jetpack/

There is a background-image:
background-image: url(//ps.w.org/jetpack/assets/banner-772x250.png?rev=969908);

Please advise.

Kindly

hwaal on "Removing jQuery from header"

$
0
0

Hi there,

I'm trying to remove jQuery from my header, which is no problem. But I do not want to remove it from a particular page template: page-places-map.php. Still its removing jQuery + all other added scripts as well.

This is my current code:

add_filter( 'wp_default_scripts', 'remove_jquery_migrate' );

function remove_jquery_migrate( &$scripts)
{
    if(!is_admin() && !is_page_template('page-places-map.php'))
    {
        $scripts->remove( 'jquery');
        //$scripts->add( 'jquery', false, array( 'jquery-core' ), '1.2.1' );
    }
}

Much thanks!


menappi on "Image popup on mouseover/hover"

$
0
0

I have a table set up with a list of items and I have been trying to have a 'preview' image to pop up on screen when the user hovers his mouse over an icon (in one of the columns). I've successfully got my popup image to pop up but I'm having a few problems with it - 1) the image isn't popping up where I want it to and 2) sometimes the right column of my main page covers the popup image, meaning text and images in the right column will be overlayed on top. Hard to explain, easier to show. Check out this page, any help is appreciated:

usmicroscrew.com/standard-micro-fasteners/

This is the css that I pieced together:

#popup {
	color: #fff;
	background-color: #fff;
}

#popup a span {
	display: none;
}

#popup a:hover {
	background-color: #fff;
}

/* the IE correction rule */
#popup a:hover {
	color: #fff;
	background-color: #fff;
	text-indent: 0; /* added the default value */
}

#popup a:hover span {
	display: block;
	position: fixed;
	top: 15%;
	left: 17%;
	width: 700px;
	margin: 0;
	padding: 10px;
	color: #000;
	font-weight: normal;
	background: #fff;
	text-align: left;
	border: 1px solid #000;
}

And this is how I'm wrapping the image that I want the hover/popup to happen on

<div id="popup">
<a href="http://www.usmicroscrew.com/micro-screw-cad-files/M06-30-M-SS-P.pdf">
<img src="http://www.usmicroscrew.com/wp-content/uploads/pdf-download-icon.png" alt="" width="22" height="26" class="aligncenter size-full wp-image-568" />
<span><img src="http://www.usmicroscrew.com/micro-screw-cad-files/micro-screw-pics/M06-30-M-SS-P.JPG" alt="Standard Mini Fasteners Drawing Popup"></span>
</a>
</div>

Ideally I want to image popup to start just to the right of the mouseover link, like I've mocked up in this image below. Any help is appreciated.
Screenshot

jyd44 on "zxcvbn localization"

$
0
0

I would like to localize the zxcvbn script used for password strength evaluation. I have 99% percent of the data available in my language (french), but I have one question about the zxcvbn script distributed with WP. Looking at the dictionnaries, they look like obfuscated, while in the "offical" version of the script available on https://github.com/dropbox/zxcvbn they are not. This obfuscation is not so difficult to decode but brings a little bit more complexity to break the evaluation.
Is there a way to have an access to the modifications made to the original zxcvbn script to include it.

trix1985 on "How to set URL for the post while wp_insert_post is used ?"

$
0
0

hi All,

I am doing insert new post in WP database via wp_insert_post function:
$post = array(
'post_author'=>1,
'post_date'=>date('Y-m-d H:i:s'),
'post_date_gmt'=>date('Y-m-d H:i:s'),
'post_content'=> $article_content,
'post_title'=>$article_title,
'post_excerpt'=>'',
'post_status'=>'publish',
'comment_status'=>'closed',
'post_name'=> $article_title,
'post_parent'=>0,
'post_type'=>'post', // with 'portfolio' custom post type
'tax_input'=>array('Новости' => array('Новости')),
);

$post_id = wp_insert_post( $post );

Post successfully inserted. My post name / content has ukranian characters.
in my WP admin panel permalink is set to post name type. So every new post has URL like http://mysite.com/post_name_ukr

where post_name_ukr value is in ukranian characters.
Example: http://mysite.com/депутат-предлага/

I need to set english symbols for the url.
http://mysite.com/deputat-predlaga/

How to set post URL to english characters?
I.e. how to update URL of the post ?

Thanks

--
trix1985

stnick on "Menu, show top level item with first level child but enable hover for 2nd level"

$
0
0

Hello, I'm trying to figure out the following, let's say you have a menu with 3 top items:

(Item 1) (Item 2) (Item 3)

When the browser has navigated to Item 1, it only shows the children of Item 1, children of Item 2 & 3 are invisble:

>(Item 1) (Item 2) (Item 3)
(Item 1 child a) (Item 1 child b) (Item 1 child c)

However, underneath child a, there are again 3 children which only should be displayed on hover:

>(Item 1) (Item 2) (Item 3)
(Item 1 child a:hover) (Item 1 child b) (Item 1 child c)
(child a-a) (child a-b) (child a-c) (<- should only be visible upon hover event)

I'm trying to solve this through css but so far I only managed to select all child classes through classes like .current-menu-ancestor. Even if I use things like #menu-item-xxx, the children of that item also get selected.

However, I'd like to create a menu which displays the first level of children of the active parent whilst allowing a hover for the last level. Am I missing something here?

Adam on "Change shortcode handler output with JS?"

$
0
0

Hello Everyone!

I'm working on a plugin that supports certain shortcode. Let's say it's: [my_shortcode]. Now as I can only have one handler function and a function may return (return "something") value only once and then terminates I've got this problem.

Assume pseudocode:

function my_shortcode_handler($attr) {

    return '<p id="msg">Hello world!</p>";

    /... do something complicated .../

    <script>
       var m = getElementById("msg");
       m.innerHTML = 'Goodbye world!';
    </script>
    }

    add_shortcode('my_shortcode', 'my_shortcode_handler');

What I need is to immediatly output some text (visible in post) in place of shortcode but then let shortcode handler function do some work and when it's finished change already outputted text to something else.

The problem is:
1) Obviously I can't use "echo" inside plugin
2) I also (contrary to the pseudocode above) cannot use "return" on the beggining of the function in order not to terminate it
3) I need to change already outputted text, so I guess JS would be an answer her but I might as well be wrong...

Anyway, I'm pretty sure there's a solution, however I can find it. Do you have any ideas?

Thanks in advance,
A.

Alex on "publish_future_post not running"

$
0
0

Hi, I've combed the forums and various results found via Google, but have yet to find a solution to an issue I have when trying to take action when a scheduled post is published. The code is pretty simple, so I hope I'm missing something obvious here.

The goal: when a sticky post is published, remove the sticky flag from all other posts, so there is only one published sticky post at a time. It's important that this only executes at the time the new sticky post is published, not saved/scheduled, as there should always be one sticky post visible.

The code:

add_action('publish_post', 'custom_sticky_save_post');
add_action('publish_future_post', 'custom_sticky_save_post');

add_action( 'auto-draft_to_publish', 'custom_sticky_save_post' );
add_action( 'draft_to_publish', 'custom_sticky_save_post' );
add_action( 'future_to_publish', 'custom_sticky_save_post' );
add_action( 'new_to_publish', 'custom_sticky_save_post' );

function custom_sticky_save_post($post_id) {
    if(defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
        return;
    }
    $sticky = isset($_POST['sticky']) && $_POST['sticky'] == 'sticky';
    if($sticky) {
        $sticky_posts = array($post_id);
        update_option('sticky_posts', $sticky_posts);
    }
}

This executes properly for sticky posts that are published immediately, but does nothing when a scheduled post publishes, so the previous sticky post(s) remains sticky. At present, this is all on my theme's functions.php file, but once I resolve this, I will wrap it in a plugin for anyone to use. I think this should work solely with the first two add_actions, but I've included the others in an attempt to find something that works.

Thanks in advance!

steffyk on "Unwanted google ads popping up in header & footer"

$
0
0

Hi there,

Been searching all day trying to figure out how to get rid of these ads. My website is: http://skinslaserclinic.com/ .

I installed the Anti-malware plugin and it said it was clean, although I had some read/write errors...and 12 potential threats. I overrode those files with my back up files, with no luck. I wasn't sure how to find the read/write errors as I couldn't find the extension in the ftp files.

I thought it might be my browser, but deleted Chrome and installed Firefox.

I'm really only a designer...and my client isn't too happy his site is messed up. I have no idea how to fix this.

Any ideas how to get rid of these pesky ads????

Thanks so much for any help on this,
Steff


corbee on "Wordpress can't install my plugin automatically"

$
0
0

I just uploaded by plugin into SVN, I then tried to download it from my wordpress website, it can't read the plugin folder, so I tried to download it manually only to find that the whole SVN is in the zip file, including the tag and trunk folder! Where did I go wrong here?

By the way, my plugin link is this:
https://wordpress.org/plugins/notebook/

Joe Fury on "I've been hacked"

$
0
0

Hi There, I am having a bit of bother with my site and I am hoping one or two of you might be able to help before I crack up !! Some foreign body had got into my website and posted adware codes within, I seemed to have located them, removed them and changed passwords etc. Problem is now when I type in the web address, http://www.joefury.com, at the top of the home page there seems to be some sort of adware script and the home page itself seems to have been slightly distorted.. I put a plugin called "sucuri" in the setting and it is constantly sending me emails telling me about failed logins !! about 20 a day !! I have now tried to login via /wp-admin and its not letting me,, This is really become a serious problem for me right at a crucial time Please help, I will send you our new album outta kindness and appreciation,

Thank you

Kind regards
Joe

http://www.joefury.com

FadingMusic on "Admin Menu to Header"

$
0
0

Hi there,

I'm looking for a way to move the Howdy(user) drop down menu from the admin bar to my header menu. I've tried to google it, but I couldn't dig up the exact question I have.

Can someone please help me find a way to do this?

Thanks.

mannyotr on "Custom Form Dropdown (Add Value)"

$
0
0

I have a page in a child theme with a custom HTML form.

One of the form fields is a dropdown box with several values.

I would like to have the dropdown box have an "Other..." option. Anytime this option is selected the user would be presented with a text field in which to manually enter a value that is not available on the dropdown list.

I have researched this and understand that it has to be done with jQuery, but for the life of me I can't figure out how.

Please help.

Manny

OrbiTorbi on "WP Media Editor"

$
0
0

Hey guys,

im looking for a chance to edit images directly from edit posts.
This means with clicking on the image, the dialog to edit the images should appear (like in the media center).

Viewing all 8245 articles
Browse latest View live




Latest Images