Installing WordPress in a subdirectory with static HTML sites

I did a quick search on here and Google and can’t really find something helpful. This question here doesn’t fit my bill either. I create websites for small business/startups/persons that rarely change content. With my HTML/CSS/PHP knowledge I prefer to build the static pages from scratch so that I can control every single aspect of it (I am aware I could write WP themes but I see it rather redundant and an overkill). I simply don’t like to use WP unless I actually need a CMS, not a website builder.…

Installing WordPress in a subdirectory of static HTML sites: Any good?

I did a quick search on here and Google and can’t really find something helpful. This question here doesn’t fit my bill either. I create websites for small business/startups/persons that rarely change content. With my HTML/CSS/PHP knowledge I prefer to build the static pages from scratch so that I can control every single aspect of it (I am aware I could write WP themes but I see it rather redundant and an overkill). I simply don’t like to use WP unless I actually need a CMS, not a website builder.…

Web Design Weekly #265

Headlines Understanding the Critical Rendering Path Ire Aderinokun explains in a clear and concise manner why having knowledge of the critical rendering path for web pages is useful for understanding how a site’s performance can be improved. (bitsofco.de) Opinions of Leaders Considered Harmful (cssmojo.com) Sponsor Web Design Weekly and reach over 22,000 passionate designers and developers Articles Design like a Developer Some great tips on how to go about designing as if you were building UI components in a development environment. (medium.com) Crash Course – UI Design A pretty epic…

How can I fix: "Notice: Undefined offset: 0"?

I’m Starting a WordPress website and I’m having a problem with some of my posts. This issue is only affecting 2 out of 4 articles and after investigating I cannot think on a reason for that. This error message appears right below comments section: Notice: Undefined offset: 0 in /home/***/public_html/wp-includes/class-wp-query.php on line 3152 When I search for that line, I find this function: I have search for this function in my WordPress code and I only found a few matches: grep -r rewind_posts * wp-content/themes/magazine/themify/themify-wp-filters.php: rewind_posts(); wp-includes/class-wp-query.php: $this->rewind_posts(); wp-includes/class-wp-query.php: public…

Load scripts for do_shortcode( ‘ [ my_shortcode ] ‘ )

I want load some scripts and style only for a specific shortcode. I used if ( is_a( $post, ‘WP_Post’ ) && has_shortcode( $post->post_content, ‘my_shortcode’) ) {} It works when I put my shortcode on page but it does not work when I put my shortcode in page template. Like the following one in index.php file: echo do_shortcode( ‘ [ my_shortcode ] ‘ ); Is there any way to load scripts for [ my_shortcode ] in do_shortcode(‘ [ my_shortcode ] ‘) without checking page template. Source: https://wordpress.stackexchange.com/feeds

Restrict Login Subscriber users from accessing frontend

I’m running a private site login users have access to the front-end using [My Private Site plugin][1] However I would like to restrict subscribers users who are login from accessing frontend and keep them on the admin dashboard (backend) any Functionality I can use to add on the theme function file to restrict subscribe from accessing front-end based on user roles? Thank You Source: https://wordpress.stackexchange.com/feeds

Using post title in an array

I want to use the the_title() function to get the title of a post and then reference that title in an array. Code is as follows: <?php $title = array( the_title() ); $args = array( ‘post_type’ => array( ‘questions’ ), ‘content’ => array( $title ) ); So I want to take the post title and use the $args variable to find posts that have post type = ‘questions’ and have the current post’s title as their value for the ‘content’ taxonomy. Currently it isn’t working. The post I’m testing on…

wp_mail() function doesn’t send email in Ajax mode

When I use the wp_mail() or mail() function in AJAX, the function doesn’t work and doesn’t send email. When I use these functions simply in my functions.php file it works fine. It’s not related to WordPress functions or actions. I have checked everything, including using SMTP mail. SMTP mail works same as mail() function and it doesn’t send in AJAX mode. This is my functions.php file content: add_action( ‘phpmailer_init’, ‘wpse8170_phpmailer_init’ ); function wpse8170_phpmailer_init( PHPMailer $phpmailer ) { $phpmailer->Host = ‘godadysmtpsampledomain.secureserver.net’; $phpmailer->Port = 465; // could be different $phpmailer->Username = ‘sender@mysite.com’;…

WordPress doesn’t send SMTP email even by phpmailer hook

I used this code in my child theme(child theme functions.php): add_action( ‘phpmailer_init’, ‘wpse8170_phpmailer_init’,0 ); function wpse8170_phpmailer_init( PHPMailer $phpmailer ) { $phpmailer->Host = ‘your.smtp.server.here’; $phpmailer->Port = 25; // could be different $phpmailer->Username = ‘your_username@example.com’; // if required $phpmailer->Password = ‘yourpassword’; // if required $phpmailer->SMTPAuth = true; // if required $phpmailer->SMTPSecure = ‘ssl’; // enable if required, ‘tls’ is another possible value $phpmailer->IsSMTP(); } But it doesn’t send SMTP mail. I checked the SMTP credentials with SMTP programs(like wp mail SMTP) and they send test email successfully but when I use Contact…

Is it possible to create a custom admin page for users?

I want to greatly restrict the user’s authority in the website. I don’t want to give the user access to the admin console but I do want to allow the user to edit their username, email, and password. Everything I’ve done so far is custom (lots of wp_query) and so I haven’t used any plugins yet and would like to keep it that way if I can. Therefore, is it possible to create a custom page where the user can edit their username, email, and password? Source: https://wordpress.stackexchange.com/feeds