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 …
Category: Web

can not call functions in function.php

In front-page.php I have the following code: <span class="amountOnline"> Online: <?php echo $cbMain->GetInfo()['Players'] . '/' . $cbMain->GetInfo()['MaxPlayers']; ?> </span> Which is a function in functions.php that calls from this script.It works perfectly. But once I move this code from front-page.php to header.php, I get the following error:' Notice: Undefined variable: cbMain in C:\Users\...\header.php on line 102 Fatal error: Call to a member function GetInfo() on a non-object in C:\Users\...\header.php on line 102 In functions.php, I have this function for example: …
Category: Web

How can i showcase all my galleries?

i am working on a Website for News. Some Articles will have Galleries and some not. I want to have a site where one can see all of my Galleries and if clicked all Images are presented with and a linkt to the article. How would i do this? Thanks!
Category: Web

A way to upload old html pages with all its assets via WordPress admin and to add a fixed menu on top of those (a la Wayback Machine)

Inside a WordPress website I manage at a custom hosting, I want to have a few joke websites that looks like personal Geocities pages from the 90s, with animated gifs and all. Generally I edit these pages at a text editor manually and upload them with all the associated assets in their own folders, completely outside of the WP ecosystem. The problem is that I'm having big trouble by adding anything outside the core WP folders in the hosting I'm …
Category: Web

Should I use "Categories " or "Pages" for a WordPress Static Site (A non blog site)?

I want to use WordPress for a Company Site which is not a blog; that will have regular pages, such as "About Us", "our Products", "Our Services", etc. What is the best way to use WordPress for this project ? Should I use "Pages" to define individual pages, or Should I use "Categories" to define pages ? I'm planing to use some free WordPress Themes to design/customize and deploy the site, what should I be aware of if I'm to …
Category: Web

Wordpress Posts on Static Pages

We're struggling to get posts to show within a static footer section within Wordpress. The footer is static HTML/PHP Code. We've used the below code to show the latest post with static .php pages throughout the site, but within Wordpress it's refusing to load. Does the code need tweaking? define('WP_USE_THEMES', false); require('blog/wp-load.php'); query_posts('posts_per_page=1'); ?> <div id="blogFeed"> <?php while (have_posts()): the_post(); ?> <h4><?php the_title(); ?></h4> <?php the_excerpt(); ?> <p class="moreNews darkGrey"><a href="<?php the_permalink(); ?>" target="_blank">Read more...</a></p> <?php endwhile; ?> The static …
Category: Web

Move static site to WordPress

I want to move my website https://mysushi.ph/ to a simpler platform like WordPress so I can make small changes myself and don't be dependant on developers (e.g. title meta changes for SEO, posting blogs) the problem is I don't have a clue how to do, this can someone help me understand the process.
Category: Web

Accessing internal wordpress site from the web

My webserver(WordPress) is running Apache on localhost port 80 with dedicated public IP. On the Firewall I have configured a SNAT rule: HTTP policy - (From Anyone on the web) > (using public IP) > (send traffic to Internal IP)). I can confirm SNAT works to an extend. I can access the wordpress page through the public IP. However, the site doesn't load properly. CSS and images are gone and the whole layout is decremented: When trying to /wp-admin, the …
Category: Web

How to list newly ftp added HTML webpage under Pages section of wp-admin?

I uploaded a custom page (html,css, and a few scripts) through the file manager, and want the customer to have access to this page through the admin "Pages" menu in the admin area. The page is accessible through www.site.com/{my_page} but admin area doesn't recognize it under Pages. How should I put it under Pages section of admin area?
Category: Web

Set up new Wordpress domain using unclear files

I am assisting a development agency on a trial basis, and I was tasked with setting up a new Wordpress site using files obtained from a different agency. After setting up the installation and transferring across the files, I am having issues. According to the agency who supplied the files, the following two sites are direct implementations of these files: Handout and SoccerShop. The above sites appear to be static, and as I was not given any database backups even …
Category: Web

How to import a WP backup website into another Wordpress hosting?

Hi from one of my client i got a wp.26_73670.2020-03-05_04-54-53.tar This TAR file nothing but a backup of a WP website and when i unzip the file it contain following folder Here mystatcsite folder contain my website related data Now issue is that i bought new web-hosting and installed Wordpress in that server but i dont have any idea how to run my old website in this new web hosting server via installed WP. Its a static website so no …
Category: Web

How can I show the actual content of Posts page because the_content() is showing all blog content?

In Settings>Reading I have the following static page set Homepage: Welcome to blurr (front-page.php) Posts page: Blog Posts (home.php) I'm trying to get the_content of the Blog Posts to show the_title(): Blog Posts the_content(): Read our blurr articles But instead of showing Read our blurr articles it's showing the content of the blog posts. Below is a screenshot for reference of the issue. I currently have two blog posts, and as you can see, their content is shown below the …
Category: Web

How to set condition for all posts with one label

My blog is total 10 post's, 5 post's with 'job' label and 5 "admit card" label I set condition for 'job' label <b:if cond='data:blog.post.label == "job"'><!-- for label 'job' --><style>.body {width:1200px;}</style></b:if> That is, whenever there is a post index of the job label, then the style (body width) the change
Category: Web

Generate Static Page to Show Search Results/Detail for API

I'm fairly new to WordPress, but well seasoned in PHP. I've looked around for other examples, and most of the code samples I see are all about creating posts and hooking around the search results list to customise the display. What I have is a web form in WordPress that I intercept and pass the query to an external API and get a list of results back. I don't want to use an IFRAME. Currently at the moment, what I …
Category: Web

How to stop subdirectory wordpress install adding head elemets to entire site?

I am working on a static website, www.example.com and have installed wordpress in a subdirectory: www.example.com/blog. I have created a custom elemnt on the home page which pulls in the latest blog. To do this I have included the following code: <?php require('blog/wp-blog-header.php'); get_header(); ?> The problem I am having is that this is pulling in the meta description as well as some other meta tags which are not needed, what is the best way to fix this? FYI, this …
Category: Web

Control Content On Non-Blog Pages

I'm new to WordPress, trying to learn it's capabilities. My Goal My goal is to make a normal website but have it's content (text and images) be adjustable by the user / client, managed content. An example navigation may be: Home (normal web page) About (normal web page) Services (normal web page) Contact Us (normal web page) Blog (blog page) My Question Is this achievable? So far, it seems that WordPress is so blog-page-centric, that only via Posts would one …
Category: Web

Pages not displaying as sections on static page

I'm currently working on the Twenty-Nineteen theme. I'm trying to make each "page" display as a section on my homepage. This has worked in previous themes (i.e. Twenty Seventeen), however I'm clearly missing a step. Any help would be appreciated. Thanks. P.S. I've already gone into my settings (both from the dashboard and within the customizer)
Category: Web

Notify Jenkins of new post on Wordpress

Does anyone know if it is possible to "notify" a Jenkins VI server whenever a new post is made on a headless wordpress installation? The reason why I'm asking this is because I'm using gatsby to fetch data from a headless wordpress endpoint and I always need to trigger a new build manually whenever there is new content to be pushed. That's fine for me, but marketing and hr people don't know how to use jenkins (to be fair they …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.