Jump to content

Search the Community

Showing results for tags 'wordpress template'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hey guys. I am Looking for some help here, dunno where else to ask, but im sure someone will know where my problem is. I got this wordpress theme and cant work out whats wrong with the display image. on front end i can set the image as main image heres the php of it <?php ini_set( 'display_errors', 0 ); require( '../../../../wp-load.php' ); if (!is_user_logged_in()) { die(); } $attachmentid = (int)$_GET['id']; if ($attachmentid == 0) { die(); } global $current_user; get_currentuserinfo(); $userid = $current_user->ID; $post = get_post($attachmentid); $photo = $post->post_title; $post_parent = get_post($post->post_parent); $upload_folder = get_post_meta($post_parent->ID, "upload_folder", true); $author_id = $post_parent->post_author; //if the current user is the one who added the post if ($author_id == $userid || current_user_can('level_10')) { update_post_meta($post->post_parent, "main_image_id", $upload_folder."/".$photo); echo _d('Default image has been set',779)."<br />"._d('Refresh the page to see it change',780); } ?> and im not quite sure whats happening here, im a total ROOKIE at php as a matter of fact so yeah... the second part... the loop where its supposed call for the image, i cant really find it in all those files... maybe if somebody explains to me what happens in the last 4 liines i might figure out whats wrong?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.