Are you the publisher? Claim or contact us about this channel

Embed this content in your HTML


Report adult content:

click to rate:

Account: (login)

More Channels


Channel Catalog

Channel Description:

WordPress › Support

older | 1 | .... | 312 | 313 | (Page 314) | 315 | 316 | .... | 413 | newer

    0 0


    I need to build website where different clients have access only to their personal pages. My idea is to use wp_dropdown_pages() as login. Basically each client (USER in WP) is named same as personal PAGE. I managed to make things work till the moment when I need to combine dropdown data with login form.
    Does anyone know how to send data (page name) from dropdown to wp_login_form() as LOGIN and just type password in the box?
    This is my code:

    // Add login form to menu
    add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2);

    function add_login_logout_link($items, $args) {
    // start buffering
    // this is the actual form function
    $login_args = array(
    'redirect' => admin_url(),
    'form_id' => 'loginform-custom',
    'label_username' => __( 'Username custom text' ),
    'label_password' => __( 'Password custom text' ),
    'label_remember' => __( 'Remember Me custom text' ),
    'label_log_in' => __( 'Log In custom text' ),
    'remember' => false

    $dropdown_pages_args = array(
    'depth' => 0,
    'child_of' => 6,
    'selected' => 0,
    'echo' => 1,
    'name' => 'page_id',
    'id' => null, // string
    'class' => null, // string
    'show_option_none' => null, // string
    'show_option_no_change' => null, // string
    'option_none_value' => null, // string

    //Dropdown Pages
    wp_dropdown_pages( $dropdown_pages_args );

    // get buffering
    $loginoutform = ob_get_contents();
    // clean buffering
    $items .= $loginoutform ; // concatenate buffering with items ...
    return $items;

    0 0

    Hi - can you help with this?

    On the http://www.x.xx/wp-login.php site the classic login site apears


    Now I am about to make a page for students, and they must be able to log in with their student number. Can we somehow make 'Username' to 'Student Number' instead? I have searched alot, but the only thing I reach are plugins and methods to change the image on the login page.

    Do you have a method?

    0 0

    I'm coding this completely outside of WordPress. I'm simply trying to return the number of active installs for a given plugin. I've been all over the documentation and forums and have tried what seems to be correct, but it continues to not return the variable. Any advice?

    $slug   = "drop-cap-shortcode";
    $apiurl = "";
    $payload = array(       'action'        => 'plugin_information',
                            'request'       => serialize(array(     'slug'=>$slug,
    echo "SENDING\n";
    $ch = curl_init($apiurl);
    $ch = curl_init($apiurl.$slug);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch,CURLOPT_POST, true);
    $return = curl_exec($ch);
    $ret = (array) unserialize($return);
    echo "rating          : " . $ret[rating] . "\n";
    echo "downloads       : " . $ret[downloaded] . "\n";
    echo "last updated    : " . $ret[last_updated] . "\n";
    echo "active installs : " . $ret[active_installs] . "\n";

    The result will not ever come back with active_installs. Any help?

    0 0

    Checkout - only single entry box for email. Best practice is to have duplicate entry to help ensure no typos. Otherwise customer will not get notifications and that will increase customer service costs.

    Is there a way that I can add a 2nd entry box for emails?


    0 0

    I created an custom excerpt based on this tutorial ( but I wanted to edit the excerpt to show only two paragraphs of the post content. After researching, I found two solutions: ( and But the problem is that those codes replace the original excerpt which affect other normal excerpts that I uses in other places. I wanted to apply this code to this only custom excerpt.

    My original custom excerpt is:

    function wpden_excerpt($length_callback = '', $more_callback = '')
        global $post;
        if (function_exists($length_callback)) {
            add_filter('excerpt_length', $length_callback);
        if (function_exists($more_callback)) {
            add_filter('excerpt_more', $more_callback);
        $output = get_the_excerpt();
        $output = apply_filters('wptexturize', $output);
        $output = apply_filters('convert_chars', $output);
        $output = '<p>' . $output . '</p>';
        echo $output;
    // Custom Length
    function wpden_mag_len($length) {
        return 200;
    function wpden_more_view($more){
    global $post;
    return '... <a class="view-article" href="' . get_permalink($post->ID) . '">' . __('', 'wpden') . '</a>';

    and I call it in my template.php:
    <?php wpden_excerpt('wpden_mag_len','wpden_more_view'); ?>

    I tried to add the code to my original code and tried many variations but I couldn't get it to work!!! Here's one of the variations I tried:

    function wpden_excerpt($text, $raw_excerpt)
        global $post;
      if( ! $raw_excerpt ) {
            $content = apply_filters( 'the_content', get_the_content() );
            $text = substr( $content, 0, strpos( $content, '</p>' ) + 4 );
        return $text;
    	if(function_exists($text)) {
    		add_filter( 'wp_trim_excerpt', 'wpden_excerpt');
    	echo $text;

    In which I call it in my template.php:
    <?php wpden_excerpt(); ?>

    but it didn't work. I need help. Basically, I wanted the excerpt to display two paragraphs without the "read more" link at the end....

    0 0

    We have many different administrators on our account with unknown users. The users keep appearing after we delete them. We have seen spam text advertisements published on pages. When we delete those unknown administrators some of our pages (which they did not publish) were found in the trash. When we restored these pages all the images were gone. Does anyone know what can be done to remedy this hack?
    One of the administrators email addresses is we also found unknown Russian language in our code. When we google this email address the same language comes up. Definitely spam. Can anyone help?

    0 0

    Dear sir,

    I've been facing this issue last five months and unable to sort out this issue, so finally, I come here and expecting to be sorted out today.

    Here is the example:

    My site is:

    Now, if you look at the screenshot and click on the my site link, it landing to 404 page error.

    Many expert said, 404 won't harm your ranking, but I am seeing the trust of my site gradually decreased and it is now only TF2

    I build few powerful links but site kws doesn't move up, they stick to their previous ranking.

    Hacker is sending daily hundreds of links each day.I want him to stop these. Most of the links I seen coming form russian and chinese types sites and forums as well.

    What to do? Please, give me some advise.


    0 0

    I have made this code and tried it as a plugin and in functions.php
    The email is sending but I can only retrieve the order number. get_post_meta is not working.
    $order->billing_first_name is not working either
    Any idea please ???

    function order_completed00($order_id) {
    		$order = new WC_Order($order_id);
    		$msg =  'hello, ' . $order->billing_first_name . '.<br />';
    		$msg .= 'order info:' . $order->get_order_number() . ' .<br />';
    		$msg .= 'Obrigado.'.get_post_meta( $order_id, '_payment_method', true ).get_post_meta( $nn, '_payment_method', true );
    $headers = array('Content-Type: text/html; charset=UTF-8');
    wp_mail( '', 'email from plugin', $msg, $headers );
    add_action( 'woocommerce_new_order', 'order_completed00' );

    0 0

    Hi, unsure if correct forum but here goes.

    I have an installation with Buddy theme installed with buddypress. I want to exclude a category of post from the loop and found this code at

    add_action( 'pre_get_posts', 'exclude_category_posts' );
    * @author Brad Dalton - WP Sites
    * @example
    function exclude_category_posts( $query ) {
    if( $query->is_main_query() && $query->is_home() ) {
    $query->set( 'cat', '-27,-30' );

    When I put this in my functions.php in my child theme, the admin outputs this error:

    Warning: Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/wp-content/themes/buddy-child/functions.php:37) in /home/mysite/public_html/wp-admin/post.php on line 242

    Warning: Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/wp-content/themes/buddy-child/functions.php:37) in /home/mysite/public_html/wp-includes/pluggable.php on line 1207

    The frontend is not affected, but shows the category ID I want to exclude.

    Can anyone please help me find out what the problem is?


    0 0

    Below is what I get when I try to go to my site::::

    HACKED BY g0nzalez and Selyani17


    Death To zionist

    מוות לציוני

    الموت لبني صهيون

    No peace between us, which binds us , is only war ,we win or we win no. other choice

    אין שלום בינינו, שקושר אותנו, הוא המלחמה רק, אנחנו מנצחים או שננצח לא. ברירה אחרת

    אויב ישראלי, אתם המטרה היחידה והאויב היחיד, אני גדלתי על זה, ואתה תמיד יהיה האויב שלי ושלום

    מעולם לא דחה איתך, הקשר היחיד בינינו לבינך הוא במצב של מלחמה התמידית, יום אחד נפגש בשדה הקרב ..!!

    عدوي الإسرائيلي ، أنت هدفي الوحيد و عدوي الوحيد ، تربيت على ذلك ، و ستكون أنت دائماً و أبداً

    عدوي ، السلام مرفوض معكم ، العلاقة الوحيدة بيننا و بينكم هي حالة الحرب الدائمة ، يوما ما سوف نلتقي على أرض المعركة

    Israeli enemy, you are my only goal is the only enemy, I grew up on it, and you will always

    be my enemy and never, rejected peace with you, the only relationship between us

    and you is a state of permanent war, one day we will meet on the battlefield

    0 0


    I am using PHP Code for posts to write php codes in pages. and i wanted to use <!--nextpage--> for pagination.
    But i am getting below error
    Parse error: syntax error, unexpected $end in /home/yhmjmuia/public_html/wp-content/plugins/php-code-for-posts/PHPPostCode.php(59) : eval()’d code on line 92

    Please help me sort this.
    Thank you

    0 0


    I'm having trouble formatting the variations output in my emails-order-items.php template

    This is the line that outputs the variations in my emails

    // Variation
    echo ($item_meta->meta) ? '
    <small>' . nl2br( $item_meta->display( true, true ) ) . '</small>' : '';

    How do I format it this so I can control style of variations and attributes independently?

    <small> tags style the entire output and won't give me style attribute only

    I have looked at but im not too great with code and am unsure as to how to implement this into my php

    0 0

    i want to exclude category posts from index & archive page

    so i wrote this script in functions.php

    function exclude_category($query) {
            if ( $query->is_home() || $query->is_archive()  ) {
            $query->set('cat', '-33799');
            return $query;
            add_filter('pre_get_posts', 'exclude_category');

    everything works fine till here , but i need to some latest posts from this category in a box in all of pages

        $args = array ( 'category' => "33799", 'posts_per_page' => 2);
        $recentposts = get_posts( $args );
        foreach ($recentposts as $post) : setup_postdata($post);
             if ( get_post_meta($post->ID,"news_thumb", TRUE) ) {
                 $img = get_post_custom_values("news_thumb", $post->ID);
             } else {
                 $img = 'images/no_pic.jpg';
             if ( get_post_meta($post->ID,"news_short_content", TRUE) ) {
                 $content = get_post_custom_values("news_short_content", $post->ID);
             } else {
                 $content = '';
    <?php endforeach; ?>

    when i add this script to header.php I've get wrong output , i can understand why this is happening

    because i excluded category in query , but i have no idea how can i fix this

    0 0

    I'm building a system where the products are read in from a 3rd party. I have these read in and stored in a database. This third party can add products, edit products and remove products also.

    What I want is something like a custom post type where each of these products are selectable to add extra content such as images, copy, maybe some ACF data, meta (using the third part plugin), etc.

    Any one know how to do this? I don't want the original data editable just to expand upon it.

    Anybody know of a way to do this? Or some sort of a clue? Thank you in advance!

    0 0

    Is it possible to create a plugin that upon activation configures the medialibrary of the site (in multi-site) to load other images from a given path alongside the one's that are loaded from the default folder (the one for example in upload/2015/3/...)

    There don't seem to be any hooks or filters available for this as far as I can see. I'm not even sure if it is possible as I don't have that much knowledge about the wp system yet.

    0 0

    I use $wpdb Object to talk to the database and handle some of the functions in the form on this page.

    It's the blue form on the right

    I'm calling wpdb() class

    When I use $wpdb->update I can't get any data to populate in my database.
    Connection seems to be fine

    this is where it's having problems

    <?php $wpdb->insert( $leads_table, $data, $format ); ?>

    Let me know if anyone is having similar issues


    0 0

    Is there any way to make WP_Customize_Image_Control use a specific image size? All I could find was a way to recommend a size

    0 0

    this is my website

    i want the custom background to be clickable with custom URL to got to any link I want

    please help

    0 0

    the php-documtation says, that serialized data would better saved in blob-fields as in text-fields. (
    The wp-tables wp-options, wp_postmeta und wp_usermeta uses mysql-field-type longtext.
    Wy not blob-fields?


    0 0

    I'm familiar with get_permalink() to get the permalink URL, but I need to get the URL of the page regardless of the user having permalink settings or not. In other words, if they have the 'default' permalink settings, I would like that URL.

    For example, suppose I have a page whose ID is 12345. The permalink URL might look something like this:

    The 'default' URL might look like this:

    Is there a WP specific function to obtain this URL? I'm familiar with $_SERVER['REQUEST_URI'] and $_SERVER['PHP_SELF'] , but was hoping for something WP specific.


older | 1 | .... | 312 | 313 | (Page 314) | 315 | 316 | .... | 413 | newer